Reputation: 135
I'm coding the rotating machinery and using the Angle type value, converted from the time like the code below.
der(thetta)=(180/pi)*from_rpm(omega) "convert time to Angle";
But, Using only this code, the angle value keep increasing.
Then, How can i make the value rotate in the 0 to 720 deg range. (0deg => 720deg => 0deg => 720deg)
Upvotes: 0
Views: 91
Reputation:
I suggest to take a look at the model Modelica.Blocks.Math.WrapAngle and the relative function Modelica.Math.wrapAngle (Modelica Standard Library 3.2.3)
They seem to behave the way you want to implement your model, though with different boundary values.
Upvotes: 3