dzp = 'constructor'.fromReal(r)
This function constructs a DiscreteZerosAndPoles record zp from a Real value, i.e. a without dynamics:
y = r*u
Therefore, the record is defined by
dzp.k = r; dzp.n1 = fill(0,1); dzp.n2 = fill(0,1,2); dzp.d1 = fill(0,1); dzp.d2 = fill(0,1,2);
encapsulated function fromReal import Modelica; import Modelica_LinearSystems2; import Modelica_LinearSystems2.DiscreteZerosAndPoles; input Real r "Value of Real variable"; input Modelica.Units.SI.Time Ts = 0 "Sample time"; input Modelica_LinearSystems2.Utilities.Types.Method method = Modelica_LinearSystems2.Utilities.Types.Method.Trapezoidal "Discretization method"; input String uName = "" "input name"; input String yName = "" "output name"; output DiscreteZerosAndPoles dzp(redeclare Real n1[0], redeclare Real n2[0, 2], redeclare Real d1[0], redeclare Real d2[0, 2]) "= r"; end fromReal;