Ticket #1094: RealInput.mo
File RealInput.mo, 463 bytes (added by , 16 years ago) |
---|
Line | |
---|---|
1 | // works, 2 equations and 2 variables |
2 | model RealInputOK |
3 | input Real u; |
4 | Modelica.Blocks.Continuous.FirstOrder firstOrder; |
5 | equation |
6 | connect(u, firstOrder.u); |
7 | end RealInputOK; |
8 | |
9 | // fails, 3 equations and 2 variables |
10 | connector RealInput = input Real; // from Modelica.Blocks.Interfaces.RealInput |
11 | model RealInputFail |
12 | RealInput u; |
13 | Modelica.Blocks.Continuous.FirstOrder firstOrder; |
14 | equation |
15 | connect(u.x, firstOrder.u); |
16 | end RealInputFail; |