Skip to content

Commit

Permalink
Merge pull request #1802 from lbl-srg/issue1801_cdl_icons
Browse files Browse the repository at this point in the history
Added output value to icon for #1801
  • Loading branch information
mwetter authored Mar 3, 2020
2 parents 682a06c + 99ef240 commit 1de1998
Show file tree
Hide file tree
Showing 52 changed files with 443 additions and 107 deletions.
10 changes: 9 additions & 1 deletion Buildings/Controls/OBC/CDL/Continuous/Abs.mo
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ annotation (
extent={{-34,-28},{38,-76}},
lineColor={192,192,192},
textString="abs"),
Line(points={{-88,0},{76,0}}, color={192,192,192})}),
Line(points={{-88,0},{76,0}}, color={192,192,192}),
Text(
extent={{226,60},{106,10}},
lineColor={0,0,0},
textString=DynamicSelect("", String(y, leftjustified=false, significantDigits=3)))}),
Documentation(info="<html>
<p>
Block that outputs <code>y = abs(u)</code>,
Expand All @@ -49,6 +53,10 @@ where
</html>", revisions="<html>
<ul>
<li>
March 2, 2020, by Michael Wetter:<br/>
Changed icon to display dynamically the output value.
</li>
<li>
January 3, 2017, by Michael Wetter:<br/>
First implementation, based on the implementation of the
Modelica Standard Library.
Expand Down
10 changes: 9 additions & 1 deletion Buildings/Controls/OBC/CDL/Continuous/Add.mo
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ where <code>k1</code> and <code>k2</code> are parameters.
</html>", revisions="<html>
<ul>
<li>
March 2, 2020, by Michael Wetter:<br/>
Changed icon to display dynamically the output value.
</li>
<li>
January 3, 2017, by Michael Wetter:<br/>
First implementation, based on the implementation of the
Modelica Standard Library.
Expand All @@ -59,5 +63,9 @@ Modelica Standard Library.
Line(points={{50,0},{100,0}}, color={0,0,127}),
Text(extent={{-40,-22},{36,46}}, textString="+"),
Text(extent={{-100,52},{5,92}}, textString="%k1"),
Text(extent={{-100,-92},{5,-52}}, textString="%k2")}));
Text(extent={{-100,-92},{5,-52}}, textString="%k2"),
Text(
extent={{226,60},{106,10}},
lineColor={0,0,0},
textString=DynamicSelect("", String(y, leftjustified=false, significantDigits=3)))}));
end Add;
33 changes: 9 additions & 24 deletions Buildings/Controls/OBC/CDL/Continuous/AddParameter.mo
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ parameters and <code>u</code> is an input.
</html>", revisions="<html>
<ul>
<li>
March 2, 2020, by Michael Wetter:<br/>
Changed icon to display dynamically the output value.
</li>
<li>
January 3, 2017, by Michael Wetter:<br/>
First implementation, based on the implementation of the
Modelica Standard Library.
Expand Down Expand Up @@ -61,28 +65,9 @@ Modelica Standard Library.
Ellipse(lineColor={0,0,127}, extent={{-12,-52},{88,48}},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Text(extent={{-2,-22},{74,46}}, textString="+")}),
Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{
100,100}}), graphics={Rectangle(
extent={{-100,-100},{100,100}},
lineColor={0,0,127},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),Line(points={{-100,0},{100,0}},
color={0,0,255}),Line(points={{30,48},{30,0}}, color={
0,0,127}), Text(
extent={{16,50},{82,2}},
lineColor={0,0,0},
textString="+"),Text(
extent={{-16,54},{89,94}},
lineColor={0,0,0},
textString="%p"),
Polygon(
points={{-76,42},{-76,-44},{16,0},{-76,42}},
lineColor={28,108,200},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Text(
extent={{-102,26},{3,-14}},
lineColor={0,0,0},
textString="%k")}));
Text(extent={{-2,-22},{74,46}}, textString="+"),
Text(
extent={{226,60},{106,10}},
lineColor={0,0,0},
textString=DynamicSelect("", String(y, leftjustified=false, significantDigits=3)))}));
end AddParameter;
10 changes: 9 additions & 1 deletion Buildings/Controls/OBC/CDL/Continuous/Atan.mo
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ annotation (
points={{90,0},{68,8},{68,-8},{90,0}},
lineColor={192,192,192},
fillColor={192,192,192},
fillPattern=FillPattern.Solid)}),
fillPattern=FillPattern.Solid),
Text(
extent={{226,60},{106,10}},
lineColor={0,0,0},
textString=DynamicSelect("", String(y, leftjustified=false, significantDigits=3)))}),
Documentation(info="<html>
<p>
Block that outputs <code>y = atan(u)</code>,
Expand All @@ -60,6 +64,10 @@ where
</html>", revisions="<html>
<ul>
<li>
March 2, 2020, by Michael Wetter:<br/>
Changed icon to display dynamically the output value.
</li>
<li>
January 3, 2017, by Michael Wetter:<br/>
First implementation, based on the implementation of the
Modelica Standard Library.
Expand Down
10 changes: 9 additions & 1 deletion Buildings/Controls/OBC/CDL/Continuous/Atan2.mo
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ gives a solution in the range
</html>", revisions="<html>
<ul>
<li>
March 2, 2020, by Michael Wetter:<br/>
Changed icon to display dynamically the output value.
</li>
<li>
January 3, 2017, by Michael Wetter:<br/>
First implementation, based on the implementation of the
Modelica Standard Library.
Expand Down Expand Up @@ -84,5 +88,9 @@ Modelica Standard Library.
points={{0,90},{-8,68},{8,68},{0,90}},
lineColor={192,192,192},
fillColor={192,192,192},
fillPattern=FillPattern.Solid)}));
fillPattern=FillPattern.Solid),
Text(
extent={{226,60},{106,10}},
lineColor={0,0,0},
textString=DynamicSelect("", String(y, leftjustified=false, significantDigits=3)))}));
end Atan2;
10 changes: 9 additions & 1 deletion Buildings/Controls/OBC/CDL/Continuous/Average.mo
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ annotation (
Line(
points={{-100,60}},
color={0,0,0},
thickness=1)}),
thickness=1),
Text(
extent={{226,60},{106,10}},
lineColor={0,0,0},
textString=DynamicSelect("", String(y, leftjustified=false, significantDigits=3)))}),
Documentation(info="<html>
<p>
Block that outputs <code>y = avg(u1,u2)</code>,
Expand All @@ -46,6 +50,10 @@ where
</html>", revisions="<html>
<ul>
<li>
March 2, 2020, by Michael Wetter:<br/>
Changed icon to display dynamically the output value.
</li>
<li>
March 15, 2017, by Jianjun Hu:<br/>
First implementation, based on the implementation of the
Modelica Standard Library.
Expand Down
10 changes: 9 additions & 1 deletion Buildings/Controls/OBC/CDL/Continuous/ChangeSign.mo
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ annotation (
points={{-100,60}},
color={0,0,127},
thickness=1),
Line(points={{-100,60},{2,60}}, color={0,0,0})}),
Line(points={{-100,60},{2,60}}, color={0,0,0}),
Text(
extent={{226,60},{106,10}},
lineColor={0,0,0},
textString=DynamicSelect("", String(y, leftjustified=false, significantDigits=3)))}),
Documentation(info="<html>
<p>
Block that outputs <code>y = -u</code>,
Expand All @@ -51,6 +55,10 @@ where <code>u</code> is an input.
</html>", revisions="<html>
<ul>
<li>
March 2, 2020, by Michael Wetter:<br/>
Changed icon to display dynamically the output value.
</li>
<li>
March 15, 2017, by Jianjun Hu:<br/>
First implementation, based on the implementation of the
Modelica Standard Library.
Expand Down
10 changes: 9 additions & 1 deletion Buildings/Controls/OBC/CDL/Continuous/Cos.mo
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ annotation (
Text(
extent={{-36,80},{36,32}},
lineColor={192,192,192},
textString="cos")}),
textString="cos"),
Text(
extent={{226,60},{106,10}},
lineColor={0,0,0},
textString=DynamicSelect("", String(y, leftjustified=false, significantDigits=3)))}),
Documentation(info="<html>
<p>
Block that outputs <code>y = cos(u)</code>,
Expand All @@ -61,6 +65,10 @@ where
</html>", revisions="<html>
<ul>
<li>
March 2, 2020, by Michael Wetter:<br/>
Changed icon to display dynamically the output value.
</li>
<li>
January 3, 2017, by Michael Wetter:<br/>
First implementation, based on the implementation of the
Modelica Standard Library.
Expand Down
16 changes: 12 additions & 4 deletions Buildings/Controls/OBC/CDL/Continuous/Derivative.mo
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ If <code>k=0</code>, the block reduces to <code>y=0</code>.
</html>", revisions="<html>
<ul>
<li>
March 2, 2020, by Michael Wetter:<br/>
Changed icon to display dynamically the output value.
</li>
<li>
March 24, 2017, by Jianjun Hu:<br/>
First implementation, based on the implementation of the
Modelica Standard Library.
Expand Down Expand Up @@ -91,8 +95,12 @@ Modelica Standard Library.
textString="DT1"),
Text(extent={{-150.0,-150.0},{150.0,-110.0}},
textString="k=%k"),
Text(
extent={{-150,150},{150,110}},
textString="%name",
lineColor={0,0,255})}));
Text(
extent={{-150,150},{150,110}},
textString="%name",
lineColor={0,0,255}),
Text(
extent={{226,60},{106,10}},
lineColor={0,0,0},
textString=DynamicSelect("", String(y, leftjustified=false, significantDigits=3)))}));
end Derivative;
10 changes: 9 additions & 1 deletion Buildings/Controls/OBC/CDL/Continuous/Division.mo
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ where
</html>", revisions="<html>
<ul>
<li>
March 2, 2020, by Michael Wetter:<br/>
Changed icon to display dynamically the output value.
</li>
<li>
January 3, 2017, by Michael Wetter:<br/>
First implementation, based on the implementation of the
Modelica Standard Library.
Expand Down Expand Up @@ -54,5 +58,9 @@ Modelica Standard Library.
extent={{-150,110},{150,150}},
textString="%name"),
Line(points={{-100,60},{-66,60},{-40,30}}, color={0,0,127}),
Line(points={{-100,-60},{0,-60},{0,-50}}, color={0,0,127})}));
Line(points={{-100,-60},{0,-60},{0,-50}}, color={0,0,127}),
Text(
extent={{226,60},{106,10}},
lineColor={0,0,0},
textString=DynamicSelect("", String(y, leftjustified=false, significantDigits=3)))}));
end Division;
10 changes: 9 additions & 1 deletion Buildings/Controls/OBC/CDL/Continuous/Exp.mo
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ annotation (
Text(
extent={{-150,150},{150,110}},
textString="%name",
lineColor={0,0,255})}),
lineColor={0,0,255}),
Text(
extent={{226,60},{106,10}},
lineColor={0,0,0},
textString=DynamicSelect("", String(y, leftjustified=false, significantDigits=3)))}),
Documentation(info="<html>
<p>
Block that outputs <code>y = exp(u)</code>,
Expand All @@ -48,6 +52,10 @@ base-e exponential function.
</html>", revisions="<html>
<ul>
<li>
March 2, 2020, by Michael Wetter:<br/>
Changed icon to display dynamically the output value.
</li>
<li>
January 3, 2017, by Michael Wetter:<br/>
First implementation, based on the implementation of the
Modelica Standard Library.
Expand Down
10 changes: 9 additions & 1 deletion Buildings/Controls/OBC/CDL/Continuous/Feedback.mo
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ where
</html>", revisions="<html>
<ul>
<li>
March 2, 2020, by Michael Wetter:<br/>
Changed icon to display dynamically the output value.
</li>
<li>
January 3, 2017, by Michael Wetter:<br/>
First implementation, based on the implementation of the
Modelica Standard Library.
Expand All @@ -51,5 +55,9 @@ Modelica Standard Library.
textString="%name"),
Text(extent={{-100,-4},{-40,56}},
textString="+",
lineColor={0,0,0})}));
lineColor={0,0,0}),
Text(
extent={{226,60},{106,10}},
lineColor={0,0,0},
textString=DynamicSelect("", String(y, leftjustified=false, significantDigits=3)))}));
end Feedback;
10 changes: 9 additions & 1 deletion Buildings/Controls/OBC/CDL/Continuous/Gain.mo
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ where
</html>", revisions="<html>
<ul>
<li>
March 2, 2020, by Michael Wetter:<br/>
Changed icon to display dynamically the output value.
</li>
<li>
January 3, 2017, by Michael Wetter:<br/>
First implementation, based on the implementation of the
Modelica Standard Library.
Expand All @@ -44,5 +48,9 @@ Modelica Standard Library.
Text(
extent={{-150,144},{150,104}},
textString="%name",
lineColor={0,0,255})}));
lineColor={0,0,255}),
Text(
extent={{226,60},{106,10}},
lineColor={0,0,0},
textString=DynamicSelect("", String(y, leftjustified=false, significantDigits=3)))}));
end Gain;
10 changes: 9 additions & 1 deletion Buildings/Controls/OBC/CDL/Continuous/IntegratorWithReset.mo
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ Icon(coordinateSystem(
Text(
extent={{-150,150},{150,110}},
textString="%name",
lineColor={0,0,255})}),
lineColor={0,0,255}),
Text(
extent={{226,60},{106,10}},
lineColor={0,0,0},
textString=DynamicSelect("", String(y, leftjustified=false, significantDigits=3)))}),
Documentation(info="<html>
<p>
This model is similar to
Expand Down Expand Up @@ -163,6 +167,10 @@ has been copied into this model rather than extended.
</html>", revisions="<html>
<ul>
<li>
March 2, 2020, by Michael Wetter:<br/>
Changed icon to display dynamically the output value.
</li>
<li>
November 6, 2017, by Michael Wetter:<br/>
Explicitly declared types from CDL.
</li>
Expand Down
8 changes: 6 additions & 2 deletions Buildings/Controls/OBC/CDL/Continuous/LimPID.mo
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,10 @@ or the control literature.
revisions="<html>
<ul>
<li>
March 2, 2020, by Michael Wetter:<br/>
Changed icon to display dynamically the output value.
</li>
<li>
February 25, 2020, by Michael Wetter:<br/>
Changed icon to display the output value.
</li>
Expand Down Expand Up @@ -559,7 +563,7 @@ First implementation.
pattern=LinePattern.None,
lineColor={0,0,0}),
Text(
extent={{92,28},{-28,-22}},
extent={{226,60},{106,10}},
lineColor={0,0,0},
textString=DynamicSelect("", String(y, leftJustified = false, significantDigits=2)))}));
textString=DynamicSelect("", String(y, leftjustified=false, significantDigits=3)))}));
end LimPID;
10 changes: 9 additions & 1 deletion Buildings/Controls/OBC/CDL/Continuous/Limiter.mo
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ If <code>uMax &lt; uMin</code>, an error occurs and no output is produced.
</html>", revisions="<html>
<ul>
<li>
March 2, 2020, by Michael Wetter:<br/>
Changed icon to display dynamically the output value.
</li>
<li>
July 17, 2017, by Michael Wetter:<br/>
Removed cyclical definition.
</li>
Expand Down Expand Up @@ -79,5 +83,9 @@ Icon(graphics={
Text(
extent={{-100,-98},{-18,-72}},
lineColor={0,0,0},
textString="%uMin")}));
textString="%uMin"),
Text(
extent={{226,60},{106,10}},
lineColor={0,0,0},
textString=DynamicSelect("", String(y, leftjustified=false, significantDigits=3)))}));
end Limiter;
Loading

0 comments on commit 1de1998

Please sign in to comment.