| 1 | package Test
|
|---|
| 2 | model M1
|
|---|
| 3 | Modelica.Blocks.Continuous.FirstOrder firstOrder annotation(
|
|---|
| 4 | Placement(visible = true, transformation(origin = {38, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 5 | Modelica.Blocks.Sources.RealExpression realExpression annotation(
|
|---|
| 6 | Placement(visible = true, transformation(origin = {-42, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 7 | equation
|
|---|
| 8 |
|
|---|
| 9 | connect(realExpression.y, firstOrder.u) annotation(
|
|---|
| 10 | Line(points = {{-31, 20}, {26, 20}}, color = {0, 0, 127}));
|
|---|
| 11 | annotation(
|
|---|
| 12 | Icon(coordinateSystem(grid = {0.1, 0.1}), graphics = {Rectangle(extent = {{-100, 100}, {100, -100}}), Text(origin = {-1, 0}, extent = {{-79, 80}, {79, -80}}, textString = "M1")}),
|
|---|
| 13 | Diagram(coordinateSystem(extent = {{-200, -100}, {200, 100}}, grid = {0.5, 0.5})));
|
|---|
| 14 | end M1;
|
|---|
| 15 |
|
|---|
| 16 | model M2
|
|---|
| 17 | Modelica.Blocks.Continuous.Derivative derivative annotation(
|
|---|
| 18 | Placement(visible = true, transformation(origin = {50, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 19 | Modelica.Blocks.Sources.RealExpression realExpression annotation(
|
|---|
| 20 | Placement(visible = true, transformation(origin = {-30, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 21 | M1 m1 annotation(
|
|---|
| 22 | Placement(visible = true, transformation(origin = {0, 30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 23 | equation
|
|---|
| 24 | connect(realExpression.y, derivative.u) annotation(
|
|---|
| 25 | Line(points = {{-18, -30}, {36, -30}, {36, -30}, {38, -30}}, color = {0, 0, 127}));
|
|---|
| 26 | annotation(
|
|---|
| 27 | Icon(coordinateSystem(grid = {0.1, 0.1})),
|
|---|
| 28 | Diagram(coordinateSystem(extent = {{-200, -100}, {200, 100}}, grid = {0.5, 0.5})));
|
|---|
| 29 | end M2;
|
|---|
| 30 | annotation(
|
|---|
| 31 | uses(Modelica(version = "3.2.3")));
|
|---|
| 32 | end Test;
|
|---|