Implemented fixes and improvements during comissioning

- New Balancing mode
- HMI Interface for Inverterdata implemented
- Adjusted GVL_CONFIG values
- Read inverter data even when inverter is off
- Added OPC UA settings to inverter data hmi interface
- Added multisettings to safety project for strings
This commit is contained in:
Matthias Heisig
2024-05-06 11:05:33 +02:00
parent b95033a155
commit 327f324be8
58 changed files with 24795 additions and 3667 deletions

View File

@@ -9,18 +9,21 @@ VAR_INPUT
// Enable
xEnable : BOOL;
// Start balancing
xStartBalancing : BOOL;
// Component shortage workaround
stModuleVoltageConfig : ST_MODULE_VOLT_CONFIG;
// Module in safety check mode
xInSafetyCheckMode : BOOL;
// Module completely off
xOff : BOOL := TRUE;
// All safetyinterlocks are ok
xSafetyIntlksOk : BOOL;
// Module completely off
xOff : BOOL := TRUE;
// HMI Interface
stHMIInterface : REFERENCE TO ST_MODULE_HMI_INTERFACE;
@@ -35,6 +38,12 @@ VAR_INPUT
// Input to confirm all errors
xConfirmAlarms : BOOL;
// Balancing target Voltage
rBalancingTargetVoltage : REAL;
// Inverter enabled status
xInverterEnabled : BOOL;
END_VAR
VAR_OUTPUT
// Module voltage
@@ -57,6 +66,12 @@ VAR_OUTPUT
// All modules in automatic mode
xAllUnitsInAutomatic : BOOL;
// Smallest segment voltage
rSmallestSegmentVoltage : REAL;
// Balancing done
xBalancingDone : BOOL;
END_VAR
VAR
_fbUnit1 : FB_Unit(CONCAT(Name, ' - Unit 1'));
@@ -80,6 +95,11 @@ VAR
_sName : STRING;
_fbBalanceNotOkSignal : FB_ReleaseSignal;
xDebug1 : BOOL;
xDebug2 : BOOL;
xDebug3 : BOOL;
xDebug4 : BOOL;
END_VAR
]]></Declaration>
<Implementation>
@@ -99,6 +119,8 @@ xSafetyIntlksOk := TRUE;
// ===============================
_fbUnit1(
xEnable := xEnable,
xStartBalancing := xStartBalancing,
xInverterEnabled := xInverterEnabled,
xVoltageSensorIs1500V := stModuleVoltageConfig.xUnit1Is1500V,
xInSafetyCheckMode := xInSafetyCheckMode,
stUnitConfig:= GVL_CONFIG.stUnitConfig,
@@ -107,7 +129,8 @@ _fbUnit1(
xReleaseErrors:= xReleaseErrors,
xReleaseLimitErrors:= xReleaseLimitErrors,
xConfirmAlarms:= xConfirmAlarms,
xReleaseManualMode := xReleaseManualMode,
xReleaseManualMode := xReleaseManualMode,
rBalancingTargetVoltage := rBalancingTargetVoltage,
_xWarningConfirmPending=> );
IF _fbUnit1.xWarning THEN
@@ -116,6 +139,7 @@ END_IF
IF _fbUnit1.xError THEN
xError := TRUE;
xDebug1 := TRUE;
END_IF
IF NOT _fbUnit1.xSafetyIntlksOk THEN
@@ -132,6 +156,8 @@ END_IF
// ===============================
_fbUnit2(
xEnable := xEnable,
xStartBalancing := xStartBalancing,
xInverterEnabled := xInverterEnabled,
xVoltageSensorIs1500V := stModuleVoltageConfig.xUnit2Is1500V,
xInSafetyCheckMode := xInSafetyCheckMode,
stUnitConfig:= GVL_CONFIG.stUnitConfig,
@@ -140,7 +166,8 @@ _fbUnit2(
xReleaseErrors:= xReleaseErrors,
xReleaseLimitErrors:= xReleaseLimitErrors,
xConfirmAlarms:= xConfirmAlarms,
xReleaseManualMode := xReleaseManualMode,
xReleaseManualMode := xReleaseManualMode,
rBalancingTargetVoltage := rBalancingTargetVoltage,
_xWarningConfirmPending=> );
IF _fbUnit2.xWarning THEN
@@ -149,6 +176,7 @@ END_IF
IF _fbUnit2.xError THEN
xError := TRUE;
xDebug2 := TRUE;
END_IF
IF NOT _fbUnit2.xSafetyIntlksOk THEN
@@ -165,6 +193,8 @@ END_IF
// ===============================
_fbUnit3(
xEnable := xEnable,
xStartBalancing := xStartBalancing,
xInverterEnabled := xInverterEnabled,
xVoltageSensorIs1500V := stModuleVoltageConfig.xUnit3Is1500V,
xInSafetyCheckMode := xInSafetyCheckMode,
stUnitConfig:= GVL_CONFIG.stUnitConfig,
@@ -173,7 +203,8 @@ _fbUnit3(
xReleaseErrors:= xReleaseErrors,
xReleaseLimitErrors:= xReleaseLimitErrors,
xConfirmAlarms:= xConfirmAlarms,
xReleaseManualMode := xReleaseManualMode,
xReleaseManualMode := xReleaseManualMode,
rBalancingTargetVoltage := rBalancingTargetVoltage,
_xWarningConfirmPending=> );
IF _fbUnit3.xWarning THEN
@@ -182,6 +213,7 @@ END_IF
IF _fbUnit3.xError THEN
xError := TRUE;
xDebug3 := TRUE;
END_IF
IF NOT _fbUnit3.xSafetyIntlksOk THEN
@@ -198,6 +230,8 @@ END_IF
// ===============================
_fbUnit4(
xEnable := xEnable,
xStartBalancing := xStartBalancing,
xInverterEnabled := xInverterEnabled,
xVoltageSensorIs1500V := stModuleVoltageConfig.xUnit4Is1500V,
xInSafetyCheckMode := xInSafetyCheckMode,
stUnitConfig:= GVL_CONFIG.stUnitConfig,
@@ -207,6 +241,7 @@ _fbUnit4(
xReleaseLimitErrors:= xReleaseLimitErrors,
xConfirmAlarms:= xConfirmAlarms,
xReleaseManualMode := xReleaseManualMode,
rBalancingTargetVoltage := rBalancingTargetVoltage,
_xWarningConfirmPending=> );
IF _fbUnit4.xWarning THEN
@@ -215,6 +250,7 @@ END_IF
IF _fbUnit4.xError THEN
xError := TRUE;
xDebug4 := TRUE;
END_IF
IF NOT _fbUnit4.xSafetyIntlksOk THEN
@@ -232,6 +268,12 @@ END_IF
_xAllUnitsReady := _fbUnit1.xReady AND _fbUnit2.xReady AND _fbUnit3.xReady AND _fbUnit4.xReady;
// ===============================
// Balancing done check
// ===============================
xBalancingDone := _fbUnit1.xBalancingDone AND _fbUnit2.xBalancingDone AND _fbUnit3.xBalancingDone AND _fbUnit4.xBalancingDone;
// ===============================
// Units in shutdown discharge mode
// ===============================
@@ -294,24 +336,24 @@ END_IF
// Release signal for balance not ok
_fbBalanceNotOkSignal(
xSignal:= _xBalanceOk OR (NOT xEnable),
xRelease:= TRUE,
timOnDelay:= T#5S,
timOffDelay:= T#60S,
xSignal:= NOT _xBalanceOk,
xRelease:= xEnable AND _xAllUnitsReady,
timOnDelay:= T#10S,
timOffDelay:= T#5S,
xReleaseSignal=> );
// Signal an error if all units are ready and module is out of balance
IF _xAllUnitsReady AND (NOT _fbBalanceNotOkSignal.xReleaseSignal) THEN
IF _xAllUnitsReady AND _fbBalanceNotOkSignal.xReleaseSignal THEN
xError := TRUE;
END_IF
// Raise error
IF (NOT _xBalanceOk) AND (NOT _fbUnitsOutOfBalanceAlarm.bRaised) THEN
IF _fbBalanceNotOkSignal.xReleaseSignal AND (NOT _fbUnitsOutOfBalanceAlarm.bRaised) THEN
_fbUnitsOutOfBalanceAlarm.Raise(0);
END_IF
// Clear error
IF _xBalanceOk AND _fbUnitsOutOfBalanceAlarm.bRaised THEN
// Clear error only with confirmation because of voltage ripple event spam
IF (NOT _fbBalanceNotOkSignal.xReleaseSignal) AND _fbUnitsOutOfBalanceAlarm.bRaised AND xConfirmAlarms THEN
_fbUnitsOutOfBalanceAlarm.Clear(0, FALSE);
END_IF
@@ -329,6 +371,14 @@ ELSE
xReady := FALSE;
END_IF
// ===============================
// Get the smallest segment Voltage
// for balancing
// ===============================
rSmallestSegmentVoltage := MIN(_fbUnit1.rCurrentVoltage, _fbUnit2.rCurrentVoltage, _fbUnit3.rCurrentVoltage, _fbUnit4.rCurrentVoltage);
// ===============================
// Module status sum
// ===============================
@@ -399,27 +449,61 @@ _fbUnitsOutOfBalanceAlarm.ipArguments.Clear().AddString(_sName);]]></ST>
</Property>
<LineIds Name="FB_Module">
<LineId Id="903" Count="15" />
<LineId Id="1601" Count="0" />
<LineId Id="1706" Count="0" />
<LineId Id="1305" Count="0" />
<LineId Id="1226" Count="0" />
<LineId Id="919" Count="2" />
<LineId Id="924" Count="27" />
<LineId Id="924" Count="3" />
<LineId Id="1588" Count="0" />
<LineId Id="928" Count="7" />
<LineId Id="1482" Count="0" />
<LineId Id="936" Count="15" />
<LineId Id="1602" Count="0" />
<LineId Id="1707" Count="0" />
<LineId Id="1306" Count="0" />
<LineId Id="1227" Count="0" />
<LineId Id="952" Count="2" />
<LineId Id="957" Count="27" />
<LineId Id="957" Count="3" />
<LineId Id="1589" Count="0" />
<LineId Id="961" Count="7" />
<LineId Id="1483" Count="0" />
<LineId Id="969" Count="15" />
<LineId Id="1603" Count="0" />
<LineId Id="1708" Count="0" />
<LineId Id="1307" Count="0" />
<LineId Id="1228" Count="0" />
<LineId Id="985" Count="2" />
<LineId Id="990" Count="27" />
<LineId Id="990" Count="3" />
<LineId Id="1590" Count="0" />
<LineId Id="994" Count="7" />
<LineId Id="1484" Count="0" />
<LineId Id="1002" Count="15" />
<LineId Id="1604" Count="0" />
<LineId Id="1709" Count="0" />
<LineId Id="1308" Count="0" />
<LineId Id="1229" Count="0" />
<LineId Id="1018" Count="2" />
<LineId Id="1023" Count="87" />
<LineId Id="1023" Count="3" />
<LineId Id="1702" Count="0" />
<LineId Id="1027" Count="7" />
<LineId Id="1485" Count="0" />
<LineId Id="1035" Count="14" />
<LineId Id="1597" Count="3" />
<LineId Id="1596" Count="0" />
<LineId Id="1594" Count="0" />
<LineId Id="1050" Count="60" />
<LineId Id="1387" Count="0" />
<LineId Id="1386" Count="0" />
<LineId Id="1389" Count="4" />
<LineId Id="1388" Count="0" />
<LineId Id="1111" Count="42" />
<LineId Id="1111" Count="28" />
<LineId Id="1578" Count="1" />
<LineId Id="1577" Count="0" />
<LineId Id="1580" Count="0" />
<LineId Id="1584" Count="0" />
<LineId Id="1581" Count="2" />
<LineId Id="1140" Count="13" />
<LineId Id="674" Count="0" />
</LineIds>
<LineIds Name="FB_Module.FB_init">