I have several blocks "FixedCurrent" in my electrical circuit. I want to be able to change values of current for these block via FMU. I can change a value, using "parameter", as it presented in the code below:
type Current = Real(unit = "A", min = 0);
parameter Current CurrentTest1(start = 50) "Test current";
PowerSystems.Generic.FixedCurrent fixedCurrent3(
I = CurrentTest1,
redeclare package PhaseSystem = PhaseSystem),
annotation(...);
PowerSystems.Generic.FixedCurrent fixedCurrent1(
I = 55,
redeclare package PhaseSystem = PhaseSystem),
annotation(...);
But I can't assign input for them. for example, if I use input command(1) or RealInput block (2) to set value of current for the block fixedCurrent3:
// 1)
input Real TZtest(start=50);
PowerSystems.Generic.FixedCurrent fixedCurrent3(
I = TZtest,
redeclare package PhaseSystem = PhaseSystem),
annotation(...);
// 2)
Modelica.Blocks.Interfaces.RealInput TZTest2 annotation(...);
PowerSystems.Generic.FixedCurrent fixedCurrent3(
I = TZtest,
redeclare package PhaseSystem = PhaseSystem),
annotation(...);
I receive corresponding errors:
1) Translation Error
Component fixedCurrent3.I of variability PARAM has binding TZtest of higher variability VAR.
2)Translation Error
Component fixedCurrent3.I of variability PARAM has binding TZTest2 of higher variability VAR.
Thus I can't handle to set value for the parameter via FMU input. I will be grateful to get any solutions to this problem.