Ticket #1094: RealInput.mo

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