WIP: Aktueller stand für fehlersuche Sensorrauschen
This commit is contained in:
@@ -30,6 +30,9 @@ VAR_INPUT
|
||||
// All safetyinterlocks from safety plc are ok
|
||||
xSafetyIntlksOk AT %I* : BOOL;
|
||||
|
||||
// Safety communication error
|
||||
xSafetyComError AT %I* : BOOL;
|
||||
|
||||
// Release alarms
|
||||
xReleaseErrors : BOOL;
|
||||
|
||||
@@ -173,6 +176,9 @@ VAR
|
||||
// Start balancing internal signal
|
||||
_xStartBalancing : BOOL;
|
||||
|
||||
// Internal SOC
|
||||
_rSOC : REAL;
|
||||
|
||||
END_VAR
|
||||
|
||||
VAR PERSISTENT
|
||||
@@ -432,7 +438,13 @@ _tonSafetyOkTimeout();
|
||||
// of all units
|
||||
// ===============================
|
||||
rSmallestSegmentVoltage := MIN(_fbModule1.rSmallestSegmentVoltage, _fbModule2.rSmallestSegmentVoltage, _fbModule3.rSmallestSegmentVoltage);
|
||||
rHighestSegmentVoltage := MAX(_fbModule1.rSmallestSegmentVoltage, _fbModule2.rSmallestSegmentVoltage, _fbModule3.rSmallestSegmentVoltage);
|
||||
rHighestSegmentVoltage := MAX(_fbModule1.rHighestSegmentVoltage, _fbModule2.rHighestSegmentVoltage, _fbModule3.rHighestSegmentVoltage);
|
||||
|
||||
|
||||
// Only recalculate SOC if all modules are ready
|
||||
IF _xAllModulesReady THEN
|
||||
_rSOC := ((100.0 * rSmallestSegmentVoltage ) / 24.0) - 229.17;
|
||||
END_IF
|
||||
|
||||
|
||||
// Call inverter
|
||||
@@ -538,6 +550,8 @@ CASE _iState OF
|
||||
_iState := 21;
|
||||
END_IF
|
||||
IF _tonErrorDCCBNotClosed.Q THEN
|
||||
_xEnable := FALSE;
|
||||
xCloseDCCB := FALSE;
|
||||
_tonErrorDCCBNotClosed.IN := FALSE;
|
||||
xError := TRUE;
|
||||
xReady := FALSE;
|
||||
@@ -565,7 +579,7 @@ CASE _iState OF
|
||||
_iState := 31;
|
||||
END_IF
|
||||
|
||||
// Inverter error or ttimeout for startup
|
||||
// Inverter error or timeout for startup
|
||||
IF _fbInverter.xError OR (NOT xRepairSwitchOk) THEN // _tonInverterStartupTimeout.Q
|
||||
IF _tonInverterStartupTimeout.Q AND (NOT _fbInverterStartupTimeoutAlarm.bRaised) THEN
|
||||
_fbInverterStartupTimeoutAlarm.Raise(0);
|
||||
@@ -574,6 +588,7 @@ CASE _iState OF
|
||||
_xEnableInverter := FALSE;
|
||||
xError := TRUE;
|
||||
xErrorInverter := TRUE;
|
||||
_xEnable := FALSE;
|
||||
_tonInverterStartupTimeout(IN := FALSE);
|
||||
END_IF
|
||||
|
||||
@@ -593,9 +608,8 @@ CASE _iState OF
|
||||
_rPowerInverterInternal := rPowerInverter;
|
||||
END_IF
|
||||
|
||||
// Shutdown
|
||||
IF NOT xEnable THEN
|
||||
// _rPowerInverterInternal := 0.0;
|
||||
// _xEnableInverter := FALSE;
|
||||
_xEnable := FALSE;
|
||||
_xReleaseLimitErrorsInternal := FALSE;
|
||||
IF GVL_CONFIG.xShutdownDischargeWithInverter THEN
|
||||
@@ -621,6 +635,12 @@ CASE _iState OF
|
||||
_iState := 32;
|
||||
END_IF
|
||||
|
||||
IF xError THEN
|
||||
_rPowerInverterInternal := 0.0;
|
||||
_xEnableInverter := FALSE;
|
||||
_iState := 40;
|
||||
END_IF
|
||||
|
||||
32: // Shutdown discharge mode
|
||||
IF xShutdownDischargeAllowed AND GVL_CONFIG.xShutdownDischargeWithInverter AND xSafetyIntlksOk AND (stInverterData.rActDCVoltage > 620.0) THEN
|
||||
_rPowerInverterInternal := GVL_CONFIG.rAbsShutdownDischargePower;
|
||||
@@ -779,7 +799,26 @@ _fbSafetyInterlocksNotOkAlarm.ipArguments.Clear().AddString(_sName);]]></ST>
|
||||
</Set>
|
||||
</Property>
|
||||
<LineIds Name="FB_String">
|
||||
<LineId Id="4873" Count="525" />
|
||||
<LineId Id="4873" Count="251" />
|
||||
<LineId Id="5776" Count="0" />
|
||||
<LineId Id="5775" Count="0" />
|
||||
<LineId Id="5773" Count="0" />
|
||||
<LineId Id="5590" Count="0" />
|
||||
<LineId Id="5125" Count="0" />
|
||||
<LineId Id="5774" Count="0" />
|
||||
<LineId Id="5777" Count="0" />
|
||||
<LineId Id="5126" Count="103" />
|
||||
<LineId Id="5962" Count="1" />
|
||||
<LineId Id="5230" Count="35" />
|
||||
<LineId Id="5964" Count="0" />
|
||||
<LineId Id="5266" Count="18" />
|
||||
<LineId Id="5772" Count="0" />
|
||||
<LineId Id="5285" Count="0" />
|
||||
<LineId Id="5288" Count="23" />
|
||||
<LineId Id="5581" Count="2" />
|
||||
<LineId Id="5585" Count="1" />
|
||||
<LineId Id="5584" Count="0" />
|
||||
<LineId Id="5312" Count="86" />
|
||||
<LineId Id="527" Count="0" />
|
||||
</LineIds>
|
||||
<LineIds Name="FB_String.FB_init">
|
||||
|
||||
Reference in New Issue
Block a user