Added precharging to SafetyCheck

This commit is contained in:
Matthias Heisig
2025-02-10 08:44:52 +01:00
parent 0345f57a3f
commit f9df0a5180
27 changed files with 2469 additions and 2586 deletions

View File

@@ -510,7 +510,11 @@ CASE _iState OF
IF xEnable AND (NOT xStartBalancing) AND xAllModulesInAutoMode AND xRepairSwitchOk THEN
_xEnable := TRUE;
eStatus := E_COMPONENT_STATUS.STARTING;
_iState := 5;
IF xInSafetyCheckMode THEN
_iState := 1;
ELSE
_iState := 5;
END_IF
END_IF
// Start in balancing mode
@@ -521,6 +525,13 @@ CASE _iState OF
_iState := 7;
END_IF
1: // Wait for ready in safety check mode
IF _xAllModulesReady THEN
xResetSafetyDCCB := TRUE;
_tonResetPulseLength.IN := TRUE;
_iState := 10;
END_IF
5: // Wait for all modules to be ready in normal mode
IF _xAllModulesReady AND _xBalanceOk THEN
xResetSafetyDCCB := TRUE;
@@ -596,7 +607,11 @@ CASE _iState OF
_xEnableInverter := TRUE;
_rPowerInverterInternal := rPowerInverter;
//_rPowerInverterInternal := 0.0;
_iState := 21;
IF xInSafetyCheckMode THEN
_iState := 29;
ELSE
_iState := 21;
END_IF
END_IF
IF _tonErrorDCCBNotClosed.Q THEN
_xEnable := FALSE;
@@ -648,6 +663,14 @@ CASE _iState OF
_xEnable := FALSE;
_tonInverterStartupTimeout(IN := FALSE);
END_IF
29: // Ready in safety check mode
IF (NOT xEnable) THEN
_xEnable := FALSE;
_xReleaseLimitErrorsInternal := FALSE;
eStatus := E_COMPONENT_STATUS.SHUTDOWN;
_iState := 31;
END_IF
30: // All modules ready
// !!! ATTENTION !!!