Ticket #2899: EquationCount.mo

File EquationCount.mo, 2.2 KB (added by massimo ceraolo, 10 years ago)
Line 
1within ;
2model EquationCount
3 expandable connector Conn
4 extends Modelica.Icons.SignalBus;
5 end Conn;
6
7 Conn conn1 annotation (Placement(transformation(extent={{-20,78},{20,118}})));
8 Modelica.Blocks.Interfaces.RealInput vhVel annotation (Placement(
9 transformation(extent={{-140,-20},{-100,20}}), iconTransformation(
10 extent={{140,0},{100,40}})));
11 Modelica.Blocks.Continuous.LimPID PIDice(
12 initType=Modelica.Blocks.Types.InitPID.InitialState,
13 y_start=0,
14 Td=0,
15 yMin=-20,
16 Ti=10,
17 k=3,
18 yMax=150) annotation (Placement(transformation(
19 extent={{-10,-10},{10,10}},
20 rotation=180,
21 origin={50,44})));
22 Modelica.Blocks.Sources.Constant const(k=1) annotation (Placement(
23 transformation(
24 extent={{-10,-10},{10,10}},
25 rotation=180,
26 origin={82,44})));
27equation
28 connect(PIDice.y, conn1.iceTau)
29 annotation (Line(points={{39,44},{0,44},{0,98}}, color={0,0,127}));
30 connect(PIDice.u_s, const.y) annotation (Line(
31 points={{62,44},{71,44}},
32 color={0,0,127},
33 smooth=Smooth.None));
34 connect(PIDice.u_m, conn1.wIce) annotation (Line(
35 points={{50,56},{50,98},{0,98}},
36 color={0,0,127},
37 smooth=Smooth.None), Text(
38 string="%second",
39 index=1,
40 extent={{6,3},{6,3}}));
41 connect(vhVel, conn1.vel) annotation (Line(
42 points={{-120,0},{0,0},{0,98}},
43 color={0,0,127},
44 smooth=Smooth.None), Text(
45 string="%second",
46 index=1,
47 extent={{6,3},{6,3}}));
48 annotation (
49 Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{
50 100,100}}), graphics),
51 Icon(coordinateSystem(
52 extent={{-100,-100},{100,100}},
53 preserveAspectRatio=false,
54 initialScale=0.1,
55 grid={2,2}), graphics={Rectangle(
56 fillColor={255,255,255},
57 fillPattern=FillPattern.Solid,
58 extent={{-100,100},{100,-60}}), Text(
59 origin={0,16},
60 fillColor={255,255,255},
61 fillPattern=FillPattern.Solid,
62 extent={{-100,36},{98,-26}},
63 textString="MB1")}),
64 uses(Modelica(version="3.2.1")));
65end EquationCount;