IBN changes
added sync units for cabinet temperature, changes in modbus interface to EMS (1.0.4 and 1.0.5), added error counter to modbus communication, lot of changes to kaco (faults, consecutive errors, bms error messages), isolation error ledge, allowed startbalancing when on shutdown, tower light integration
This commit is contained in:
@@ -56,8 +56,10 @@ VAR_INPUT
|
||||
|
||||
xECWcState AT %I* : BOOL;
|
||||
|
||||
xIsoErrorL1 AT %I* : BOOL;
|
||||
xIsoErrorL2 AT %I* : BOOL;
|
||||
xIsolationOKL1 AT %I* : BOOL;
|
||||
xIsolationOKL2 AT %I* : BOOL;
|
||||
|
||||
refuStringErrorsModbus : REFERENCE TO U_STRING_ERROR_REGISTER;
|
||||
END_VAR
|
||||
VAR_OUTPUT
|
||||
// Repair switch closed
|
||||
@@ -218,6 +220,7 @@ VAR
|
||||
// Start balancing internal signal
|
||||
_xStartBalancing : BOOL;
|
||||
|
||||
_xIsoErrorActive : BOOL;
|
||||
_xIsoError : BOOL;
|
||||
|
||||
// Iso error timeout
|
||||
@@ -387,6 +390,8 @@ _fbInverter(
|
||||
rMaxBattPower:= DINT_TO_REAL(GVL_CONFIG.diMaxStringDischargePower),
|
||||
stCurrentValues => stInverterData);
|
||||
|
||||
refuStringErrorsModbus.stBitmap.bInverterError := _fbInverter.xError;
|
||||
|
||||
IF (_iState >= 30) AND (_iState < 40) THEN
|
||||
rCapacityAH := rCapacityAH + ((stInverterData.rActDCCurrent * 0.01) / 3600);
|
||||
rCapacityWH := rCapacityWH + ((stInverterData.rActACPower * 0.01) / 3600);
|
||||
@@ -862,7 +867,9 @@ END_IF
|
||||
stHMIInterface.eStatus := eStatus;
|
||||
|
||||
// Reset Safety
|
||||
xResetSafetyDCCB := xResetSafety;]]></ST>
|
||||
xResetSafetyDCCB := xResetSafety;
|
||||
|
||||
xCloseDCCB := TRUE;]]></ST>
|
||||
</Implementation>
|
||||
<Action Name="ClearAlarms" Id="{541a307f-e5d8-4588-8fd3-6f4bdf6a71dd}">
|
||||
<Implementation>
|
||||
@@ -980,8 +987,8 @@ END_IF
|
||||
// ISO Error handling
|
||||
// ===============================
|
||||
// Mute iso error when inverter is enabled
|
||||
_xIsoError := ((NOT xIsoErrorL1) OR (NOT xIsoErrorL2)) AND (NOT _fbInverter.xActive) AND (xDCCBOpen);
|
||||
_fbTONIsoError(IN := _xIsoError, PT := GVL_CONFIG.timIsoErrorTimeout);
|
||||
_xIsoErrorActive := ((NOT xIsolationOKL1) OR (NOT xIsolationOKL2)) AND (NOT _fbInverter.xActive) AND (xDCCBOpen);
|
||||
_fbTONIsoError(IN := _xIsoErrorActive, PT := GVL_CONFIG.timIsoErrorTimeout);
|
||||
|
||||
IF _fbTONIsoError.Q AND (NOT _fbIsolationAlarm.bRaised) AND xReleaseErrors THEN
|
||||
_fbIsolationAlarm.Raise(0);
|
||||
@@ -996,7 +1003,16 @@ IF _fbIsolationAlarm.eConfirmationState = TcEventConfirmationState.WaitForConfir
|
||||
END_IF
|
||||
|
||||
IF _fbTONIsoError.Q THEN
|
||||
_xIsoError := TRUE;
|
||||
END_IF
|
||||
|
||||
IF xConfirmAlarms AND (NOT _fbTONIsoError.Q) THEN
|
||||
_xIsoError := FALSE;
|
||||
END_IF
|
||||
|
||||
IF _xIsoError THEN
|
||||
_xErrorInternal := TRUE;
|
||||
refuStringErrorsModbus.stBitmap.bIsolationError := 1;
|
||||
END_IF
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user