model RelAngleSensor "Ideal sensor to measure the relative angle between two flanges"
extends Rotational.Interfaces.PartialRelativeSensor;
Modelica.Blocks.Interfaces.RealOutput phi_rel(unit = "rad", displayUnit = "deg") "Relative angle between two flanges (= flange_b.phi - flange_a.phi) as output signal"
annotation (Placement(transformation(
origin = {0, -110},
extent = {
{10, -10},
{-10, 10}},
rotation = 90)));
equation
0 = flange_a.tau;
phi_rel = flange_b.phi - flange_a.phi;
annotation (
Documentation(info = "<html>\n<p>\nMeasures the <strong>relative angle phi_rel</strong> between two flanges\nin an ideal way and provides the result as output signal <strong>phi_rel</strong>\n(to be further processed with blocks of the Modelica.Blocks library).\n</p>\n</html>"),
Icon(
coordinateSystem(
preserveAspectRatio = true,
extent = {
{-100, -100},
{100, 100}}),
graphics = {
Text(
extent = {
{20, -114},
{160, -84}},
textString = "phi_rel"),
Line(
points = {
{0, -100},
{0, -70}},
color = {0, 0, 127})}));
end RelAngleSensor;