Skip to content

Commit 3b280ad

Browse files
committed
Convert internal variables to connectors
This allows conditional connection and fixes OpenIPSL#317
1 parent cced86b commit 3b280ad

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

OpenIPSL/Electrical/Solar/PowerFactory/General/ElmGenstat.mo

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,15 @@ model ElmGenstat "Static generator"
2929
Modelica.Blocks.Interfaces.RealInput cosref if pll_connected "Optional PLL input for cosine"
3030
annotation (
3131
Placement(transformation(origin = {-108, -70}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-90, -80}, extent = {{-10, -10}, {10, 10}})));
32-
Real sinu "Internal sine of the voltage angle";
33-
Real cosu "Internal cosine of the voltage angle";
3432
Modelica.Blocks.Interfaces.RealOutput P annotation (
3533
Placement(transformation(origin = {110, -30}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {110, -40}, extent = {{-10, -10}, {10, 10}})));
3634
Modelica.Blocks.Interfaces.RealOutput Q annotation (
3735
Placement(transformation(origin = {110, -70}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {110, -80}, extent = {{-10, -10}, {10, 10}})));
36+
37+
protected
38+
Modelica.Blocks.Interfaces.RealOutput sinu "Internal sine of the voltage angle";
39+
Modelica.Blocks.Interfaces.RealOutput cosu "Internal cosine of the voltage angle";
40+
3841
equation
3942
if pll_connected then
4043
connect(sinref, sinu);

0 commit comments

Comments
 (0)