Skip to content

Commit

Permalink
Merge pull request #3303 from christiankral/remove-diagram-icons
Browse files Browse the repository at this point in the history
Remove obsolete drawings of diagram layer

I needed to revert the two PR that split Rotational and Translational in order to be able to merge this. Those will have to be created once more.
  • Loading branch information
dietmarw committed Jan 16, 2020
2 parents 9933107 + 58a17a1 commit 2f6ae65
Show file tree
Hide file tree
Showing 85 changed files with 2,063 additions and 5,985 deletions.
175 changes: 17 additions & 158 deletions Modelica/Blocks/Continuous.mo
Original file line number Diff line number Diff line change
Expand Up @@ -124,17 +124,7 @@ port has a rising edge.
textString="reset")}),
Diagram(coordinateSystem(
preserveAspectRatio=true,
extent={{-100,-100},{100,100}}), graphics={
Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),
Line(points={{-100,0},{-60,0}}, color={0,0,255}),
Line(points={{60,0},{100,0}}, color={0,0,255}),
Text(
extent={{-36,60},{32,2}},
textString="k"),
Text(
extent={{-32,0},{36,-58}},
textString="s"),
Line(points={{-46,0},{46,0}})}));
extent={{-100,-100},{100,100}})));
end Integrator;

block LimIntegrator "Integrator with limited value of the output and optional reset"
Expand Down Expand Up @@ -276,20 +266,7 @@ port has a rising edge.
textString="reset")}),
Diagram(coordinateSystem(
preserveAspectRatio=true,
extent={{-100,-100},{100,100}}), graphics={
Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),
Text(
extent={{-54,46},{-4,-48}},
textString="lim"),
Line(points={{-100,0},{-60,0}}, color={0,0,255}),
Line(points={{60,0},{100,0}}, color={0,0,255}),
Text(
extent={{-8,60},{60,2}},
textString="k"),
Text(
extent={{-8,-2},{60,-60}},
textString="s"),
Line(points={{4,0},{46,0}})}));
extent={{-100,-100},{100,100}})));
end LimIntegrator;

block Derivative "Approximated derivative block"
Expand Down Expand Up @@ -377,17 +354,7 @@ If k=0, the block reduces to y=0.
textString="k=%k")}),
Diagram(coordinateSystem(
preserveAspectRatio=true,
extent={{-100,-100},{100,100}}), graphics={
Text(
extent={{-54,52},{50,10}},
textString="k s"),
Text(
extent={{-54,-6},{52,-52}},
textString="T s + 1"),
Line(points={{-50,0},{50,0}}),
Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),
Line(points={{-100,0},{-60,0}}, color={0,0,255}),
Line(points={{60,0},{100,0}}, color={0,0,255})}));
extent={{-100,-100},{100,100}})));
end Derivative;

block FirstOrder "First order transfer function block (= 1 pole)"
Expand Down Expand Up @@ -464,17 +431,7 @@ Example:
textString="T=%T")}),
Diagram(coordinateSystem(
preserveAspectRatio=true,
extent={{-100,-100},{100,100}}), graphics={
Text(
extent={{-48,52},{50,8}},
textString="k"),
Text(
extent={{-54,-6},{56,-56}},
textString="T s + 1"),
Line(points={{-50,0},{50,0}}),
Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),
Line(points={{-100,0},{-60,0}}, color={0,0,255}),
Line(points={{60,0},{100,0}}, color={0,0,255})}));
extent={{-100,-100},{100,100}})));
end FirstOrder;

block SecondOrder "Second order transfer function block (= 2 poles)"
Expand Down Expand Up @@ -560,41 +517,7 @@ Example:
textString="w=%w")}),
Diagram(coordinateSystem(
preserveAspectRatio=true,
extent={{-100,-100},{100,100}}), graphics={
Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),
Text(
extent={{-60,60},{60,14}},
textString="k"),
Text(
extent={{-60,8},{-32,-20}},
textString="s"),
Line(points={{-100,0},{-60,0}}, color={0,0,255}),
Line(points={{60,0},{100,0}}, color={0,0,255}),
Line(points={{-50,14},{50,14}}),
Line(points={{-54,-20},{-38,-20}}),
Text(
extent={{-52,-26},{-36,-48}},
textString="w"),
Line(points={{-50,2},{-56,-8},{-56,-28},{-52,-46}}),
Line(points={{-40,2},{-34,-10},{-34,-30},{-38,-46}}),
Text(
extent={{-34,8},{-22,-10}},
textString="2"),
Text(
extent={{-34,-6},{6,-36}},
textString="+2D"),
Text(
extent={{2,8},{30,-20}},
textString="s"),
Line(points={{8,-20},{24,-20}}),
Text(
extent={{10,-26},{26,-48}},
textString="w"),
Line(points={{12,2},{6,-8},{6,-28},{10,-46}}),
Line(points={{22,2},{28,-10},{28,-30},{24,-46}}),
Text(
extent={{30,2},{58,-42}},
textString="+1")}));
extent={{-100,-100},{100,100}})));
end SecondOrder;

block PI "Proportional-Integral controller"
Expand Down Expand Up @@ -690,20 +613,7 @@ This is discussed in the description of package
textString="T=%T")}),
Diagram(coordinateSystem(
preserveAspectRatio=true,
extent={{-100,-100},{100,100}}), graphics={
Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),
Text(
extent={{-68,24},{-24,-18}},
textString="k"),
Text(
extent={{-32,48},{60,0}},
textString="T s + 1"),
Text(
extent={{-30,-8},{52,-40}},
textString="T s"),
Line(points={{-24,0},{54,0}}),
Line(points={{-100,0},{-60,0}}, color={0,0,255}),
Line(points={{62,0},{100,0}}, color={0,0,255})}));
extent={{-100,-100},{100,100}})));
end PI;

block PID "PID-controller in additive description form"
Expand Down Expand Up @@ -761,13 +671,13 @@ This is discussed in the description of package
connect(u, P.u) annotation (Line(points={{-120,0},{-80,0},{-80,80},{-64,80}}, color={0,0,127}));
connect(u, I.u)
annotation (Line(points={{-120,0},{-64,0}}, color={0,0,127}));
connect(u, D.u) annotation (Line(points={{-120,0},{-80,0},{-80,-80},{-64,
-80}}, color={0,0,127}));
connect(u, D.u) annotation (Line(points={{-120,0},{-80,0},{-80,-80},{-64,-80}},
color={0,0,127}));
connect(P.y, Add.u1) annotation (Line(points={{-18,80},{0,80},{0,8},{18,8}}, color={0,0,127}));
connect(I.y, Add.u2)
annotation (Line(points={{-18,0},{18,0}}, color={0,0,127}));
connect(D.y, Add.u3) annotation (Line(points={{-18,-80},{0,-80},{0,-8},{18,
-8}}, color={0,0,127}));
connect(D.y, Add.u3) annotation (Line(points={{-18,-80},{0,-80},{0,-8},{18,-8}},
color={0,0,127}));
connect(Add.y, Gain.u)
annotation (Line(points={{41,0},{58,0}}, color={0,0,127}));
connect(Gain.y, y)
Expand Down Expand Up @@ -1020,18 +930,9 @@ to compute u by an algebraic equation.
color={0,0,127}));
connect(gainTrack.y, addI.u3) annotation (Line(points={{-21,-70},{-88,-70},{-88,
-58},{-82,-58}}, color={0,0,127}));
connect(u_m, addP.u2) annotation (Line(
points={{0,-120},{0,-92},{-92,-92},{-92,44},{-82,44}},
color={0,0,127},
thickness=0.5));
connect(u_m, addD.u2) annotation (Line(
points={{0,-120},{0,-92},{-92,-92},{-92,-6},{-82,-6}},
color={0,0,127},
thickness=0.5));
connect(u_m, addI.u2) annotation (Line(
points={{0,-120},{0,-92},{-92,-92},{-92,-50},{-82,-50}},
color={0,0,127},
thickness=0.5));
connect(u_m, addP.u2) annotation (Line(points={{0,-120},{0,-92},{-92,-92},{-92,44},{-82,44}}, color={0,0,127}));
connect(u_m, addD.u2) annotation (Line(points={{0,-120},{0,-92},{-92,-92},{-92,-6},{-82,-6}}, color={0,0,127}));
connect(u_m, addI.u2) annotation (Line(points={{0,-120},{0,-92},{-92,-92},{-92,-50},{-82,-50}}, color={0,0,127}));
connect(Dzero.y, addPID.u2) annotation (Line(points={{-29.5,25},{-24,25},{-24,
0},{-12,0}}, color={0,0,127}));
connect(Izero.y, addPID.u3) annotation (Line(points={{-10.5,-50},{-20,-50},{-20,
Expand Down Expand Up @@ -1332,17 +1233,7 @@ y = --------- * u
textString="a(s)")}),
Diagram(coordinateSystem(
preserveAspectRatio=true,
extent={{-100,-100},{100,100}}), graphics={
Line(points={{40,0},{-40,0}}),
Text(
extent={{-55,55},{55,5}},
textString="b(s)"),
Text(
extent={{-55,-5},{55,-55}},
textString="a(s)"),
Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),
Line(points={{-100,0},{-60,0}}, color={0,0,255}),
Line(points={{60,0},{100,0}}, color={0,0,255})}));
extent={{-100,-100},{100,100}})));
end TransferFunction;

block StateSpace "Linear state space system"
Expand Down Expand Up @@ -1443,16 +1334,7 @@ results in the following equations:
color={192,192,192})}),
Diagram(coordinateSystem(
preserveAspectRatio=true,
extent={{-100,-100},{100,100}}), graphics={
Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),
Text(
extent={{-60,40},{60,0}},
textString="sx=Ax+Bu"),
Text(
extent={{-60,0},{60,-40}},
textString=" y=Cx+Du"),
Line(points={{-100,0},{-60,0}}, color={0,0,255}),
Line(points={{60,0},{100,0}}, color={0,0,255})}));
extent={{-100,-100},{100,100}})));
end StateSpace;

block Der "Derivative of input (= analytic differentiations)"
Expand Down Expand Up @@ -1611,17 +1493,7 @@ the model.
extent={{-2.0,48.0},{94.0,94.0}},
textString="%n")}),
Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{
100,100}}), graphics={
Line(points={{40,0},{-40,0}}),
Text(
extent={{-55,55},{55,5}},
textString="1"),
Text(
extent={{-55,-5},{55,-55}},
textString="a(s)"),
Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),
Line(points={{-100,0},{-60,0}}, color={0,0,255}),
Line(points={{60,0},{100,0}}, color={0,0,255})}),
100,100}})),
Documentation(info="<html>
<p>
This block defines the transfer function between the input u
Expand Down Expand Up @@ -1719,20 +1591,7 @@ initType=Modelica.Blocks.Types.Init.SteadyState).
Text(extent={{8.0,-146.0},{8.0,-106.0}},
textString="f=%f")}),
Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{
100,100}}), graphics={
Line(points={{40,0},{-40,0}}),
Text(
extent={{-55,55},{55,5}},
textString="1"),
Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),
Line(points={{-100,0},{-60,0}}, color={0,0,255}),
Line(points={{60,0},{100,0}}, color={0,0,255}),
Text(
extent={{-54,-6},{44,-56}},
textString="(s/w + 1)"),
Text(
extent={{38,-10},{58,-30}},
textString="n")}),
100,100}})),
Documentation(info="<html>
<p>This block defines the transfer function between the
input u and the output y
Expand Down
92 changes: 6 additions & 86 deletions Modelica/Blocks/Discrete.mo
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,7 @@ package Discrete
fillPattern=FillPattern.Solid,
extent={{-45.0,-10.0},{-25.0,10.0}})}),
Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{
100,100}}), graphics={
Ellipse(
extent={{-25,-10},{-45,10}},
lineColor={0,0,255},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Ellipse(
extent={{45,-10},{25,10}},
lineColor={0,0,255},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Line(points={{-100,0},{-45,0}}, color={0,0,255}),
Line(points={{45,0},{100,0}}, color={0,0,255}),
Line(points={{-35,0},{30,35}}, color={0,0,255})}),
100,100}})),
Documentation(info="<html>
<p>
Samples the continues input signal with a sampling rate defined
Expand Down Expand Up @@ -164,25 +151,7 @@ the output y is identical to parameter yStart.
textString="z")}),
Diagram(coordinateSystem(
preserveAspectRatio=true,
extent={{-100,-100},{100,100}}), graphics={
Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),
Text(
extent={{-160,10},{-140,-10}},
textString="u",
textColor={0,0,255}),
Text(
extent={{115,10},{135,-10}},
textString="y",
textColor={0,0,255}),
Line(points={{-100,0},{-60,0}}, color={0,0,255}),
Line(points={{60,0},{100,0}}, color={0,0,255}),
Line(points={{40,0},{-40,0}}),
Text(
extent={{-55,55},{55,5}},
textString="1"),
Text(
extent={{-55,-5},{55,-55}},
textString="z")}));
extent={{-100,-100},{100,100}})));
end UnitDelay;

block TransferFunction "Discrete Transfer Function block"
Expand Down Expand Up @@ -271,19 +240,7 @@ y = --------- * u
textString="a(z)")}),
Diagram(coordinateSystem(
preserveAspectRatio=true,
extent={{-100,-100},{100,100}}), graphics={
Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),
Line(
points={{40,0},{-44,0}},
thickness=0.5),
Text(
extent={{-54,54},{54,4}},
textString="b(z)"),
Text(
extent={{-54,-6},{56,-56}},
textString="a(z)"),
Line(points={{-100,0},{-60,0}}, color={0,0,255}),
Line(points={{60,0},{100,0}}, color={0,0,255})}));
extent={{-100,-100},{100,100}})));
end TransferFunction;

block StateSpace "Discrete State Space block"
Expand Down Expand Up @@ -366,16 +323,7 @@ results in the following equations:
textColor={0,0,127})}),
Diagram(coordinateSystem(
preserveAspectRatio=true,
extent={{-100,-100},{100,100}}), graphics={
Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),
Text(
extent={{-54,50},{52,-10}},
textString="zx=Ax+Bu"),
Text(
extent={{-56,14},{54,-50}},
textString=" y=Cx+Du"),
Line(points={{-102,0},{-60,0}}, color={0,0,255}),
Line(points={{60,0},{100,0}}, color={0,0,255})}));
extent={{-100,-100},{100,100}})));
end StateSpace;

block TriggeredSampler "Triggered sampling of continuous signals"
Expand Down Expand Up @@ -421,21 +369,7 @@ results in the following equations:
fillPattern=FillPattern.Solid,
extent={{-45.0,-10.0},{-25.0,10.0}})}),
Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{
100,100}}), graphics={
Ellipse(
extent={{-25,-10},{-45,10}},
lineColor={0,0,255},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Ellipse(
extent={{45,-10},{25,10}},
lineColor={0,0,255},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Line(points={{-100,0},{-45,0}}, color={0,0,255}),
Line(points={{45,0},{100,0}}, color={0,0,255}),
Line(points={{-35,0},{28,-48}}, color={0,0,255}),
Line(points={{0,-100},{0,-26}}, color={255,0,255})}),
100,100}})),
Documentation(info="<html>
<p>
Samples the continuous input signal whenever the trigger input
Expand Down Expand Up @@ -493,21 +427,7 @@ the initial value defined via parameter <strong>y0</strong>.
fillPattern=FillPattern.Solid,
extent={{-45.0,-10.0},{-25.0,10.0}})}),
Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{
100,100}}), graphics={
Ellipse(
extent={{-25,-10},{-45,10}},
lineColor={0,0,255},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Ellipse(
extent={{45,-10},{25,10}},
lineColor={0,0,255},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Line(points={{-100,0},{-45,0}}, color={0,0,255}),
Line(points={{45,0},{100,0}}, color={0,0,255}),
Line(points={{-35,0},{28,-48}}, color={0,0,255}),
Line(points={{0,-100},{0,-26}}, color={255,0,255})}),
100,100}})),
Documentation(info="<html>
<p>
Samples the continuous input signal whenever the trigger input
Expand Down

0 comments on commit 2f6ae65

Please sign in to comment.