Added shutdown when inverter error

This commit is contained in:
Matthias Heisig
2024-09-06 18:47:03 +02:00
parent 3d041c50c4
commit d9f39953a0
6 changed files with 144 additions and 73 deletions

View File

@@ -775,6 +775,7 @@ _fbNotAllAutomaticAlarm.ipArguments.Clear().AddString(_sName);]]></ST>
// ===============================
CASE _iState OF
0: // Off
// Start in enable
IF xEnable AND (NOT xStartBalancing) AND _xAllComponentsInAutomatic AND (NOT _xErrorActive) THEN
_xReleaseManualMode := FALSE;
_timUnitStartupWaitTime := GVL_CONFIG.timUnitStartupTime;
@@ -782,6 +783,7 @@ CASE _iState OF
eUnitState := E_COMPONENT_STATUS.STARTING;
END_IF
// Start in balancing mode
IF (NOT xEnable) AND xStartBalancing AND _xAllComponentsInAutomatic AND (NOT _xErrorActive) THEN
_xReleaseManualMode := FALSE;
xBalancingDone := FALSE;
@@ -802,8 +804,14 @@ CASE _iState OF
END_IF
END_IF
// If enable signal is lost
IF ((NOT xEnable) AND (NOT xStartBalancing)) THEN
eUnitState := E_COMPONENT_STATUS.SHUTDOWN;
_iState := 40;
END_IF
// If enable signal is lost, or there is an error, goto shutdown
IF ((NOT xEnable) AND (NOT xStartBalancing)) OR _xErrorActive THEN
IF _xErrorActive THEN
_xReleaseManualMode := TRUE;
_iState := 1000;
END_IF
@@ -824,6 +832,7 @@ CASE _iState OF
// If enable signal is lost, goto shutdown
IF ((NOT xEnable) AND (NOT xStartBalancing)) THEN
eUnitState := E_COMPONENT_STATUS.SHUTDOWN;
_iState := 40; // 40
END_IF
@@ -847,6 +856,7 @@ CASE _iState OF
// If enable signal is lost, goto shutdown
IF (NOT xEnable) AND (NOT xStartBalancing) THEN
eUnitState := E_COMPONENT_STATUS.SHUTDOWN;
_iState := 40;
END_IF
@@ -1110,9 +1120,23 @@ END_CASE]]></ST>
<LineId Id="2" Count="0" />
</LineIds>
<LineIds Name="FB_Unit.StateMachine">
<LineId Id="2" Count="8" />
<LineId Id="2" Count="4" />
<LineId Id="332" Count="0" />
<LineId Id="7" Count="3" />
<LineId Id="317" Count="0" />
<LineId Id="11" Count="88" />
<LineId Id="11" Count="1" />
<LineId Id="333" Count="0" />
<LineId Id="13" Count="19" />
<LineId Id="326" Count="0" />
<LineId Id="328" Count="1" />
<LineId Id="331" Count="0" />
<LineId Id="330" Count="0" />
<LineId Id="327" Count="0" />
<LineId Id="33" Count="21" />
<LineId Id="325" Count="0" />
<LineId Id="55" Count="22" />
<LineId Id="324" Count="0" />
<LineId Id="78" Count="21" />
<LineId Id="318" Count="0" />
<LineId Id="100" Count="20" />
<LineId Id="319" Count="0" />