| 1 | package Test
|
|---|
| 2 | model Test1
|
|---|
| 3 | Modelica.Blocks.Sources.Step step annotation(
|
|---|
| 4 | Placement(visible = true, transformation(origin = {-34, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 5 | MyFirstOrder myFirstOrder annotation(
|
|---|
| 6 | Placement(visible = true, transformation(origin = {14, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 7 | equation
|
|---|
| 8 | connect(myFirstOrder.u, step.y) annotation(
|
|---|
| 9 | Line(points = {{4, 0}, {-22, 0}, {-22, 0}, {-22, 0}}, color = {0, 0, 127}));
|
|---|
| 10 | annotation(
|
|---|
| 11 | Diagram(coordinateSystem(extent = {{-100, -90}, {100, 80}})));end Test1;
|
|---|
| 12 |
|
|---|
| 13 | model MyFirstOrder
|
|---|
| 14 | Modelica.Blocks.Continuous.FirstOrder firstOrder annotation(
|
|---|
| 15 | Placement(visible = true, transformation(origin = {2, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 16 | Modelica.Blocks.Interfaces.RealInput u annotation(
|
|---|
| 17 | Placement(visible = true, transformation(origin = {-106, 0}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-106, 0}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
|
|---|
| 18 | Modelica.Blocks.Interfaces.RealOutput y annotation(
|
|---|
| 19 | Placement(visible = true, transformation(origin = {106, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {106, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 20 | equation
|
|---|
| 21 | connect(firstOrder.u, u) annotation(
|
|---|
| 22 | Line(points = {{-10, 0}, {-94, 0}, {-94, 0}, {-106, 0}}, color = {0, 0, 127}));
|
|---|
| 23 | connect(y, firstOrder.y) annotation(
|
|---|
| 24 | Line(points = {{106, 0}, {14, 0}, {14, 0}, {14, 0}}, color = {0, 0, 127}));
|
|---|
| 25 | annotation(
|
|---|
| 26 | Diagram(coordinateSystem(extent = {{-100, -90}, {100, 80}})));
|
|---|
| 27 | end MyFirstOrder;
|
|---|
| 28 | annotation(
|
|---|
| 29 | Diagram(coordinateSystem(extent = {{-100, -90}, {100, 80}})),
|
|---|
| 30 | uses(Modelica(version = "3.2.3")));
|
|---|
| 31 | end Test;
|
|---|