WIP: Inbetriebnahme vorladen
This commit is contained in:
@@ -12,6 +12,9 @@ VAR_INPUT
|
||||
// Start unit
|
||||
xEnable : BOOL;
|
||||
|
||||
// Unit in safety check mode
|
||||
xInSafetyCheckMode : BOOL;
|
||||
|
||||
// Emergency stop ok
|
||||
xEmergencyStopOk : BOOL;
|
||||
|
||||
@@ -60,6 +63,9 @@ VAR_OUTPUT
|
||||
|
||||
// Current Unit voltage
|
||||
rCurrentVoltage : REAL;
|
||||
|
||||
// All components in automatic mode
|
||||
xAllComponentsInAuto : BOOL;
|
||||
END_VAR
|
||||
VAR
|
||||
// Check unit condition after some time during startup
|
||||
@@ -149,6 +155,11 @@ VAR
|
||||
|
||||
// Manual mode allowed flag
|
||||
_xReleaseManualMode : BOOL;
|
||||
|
||||
_xReleaseSignalDeltaPSegment : FB_ReleaseSignal;
|
||||
_xDeltaPSegmentInletToHigh : BOOL;
|
||||
_xEnableCheckForDeltaPSegmentInlet : BOOL;
|
||||
_xErrorDeltaPSegmentInlet : BOOL;
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
@@ -475,6 +486,25 @@ IF _fbVoltageSegment.xWarning THEN
|
||||
_xWarningActive := TRUE;
|
||||
END_IF
|
||||
|
||||
// ===============================
|
||||
// Write Voltage to HMI
|
||||
// ===============================
|
||||
stHMIInterface.rVoltage := _fbVoltageSegment.rScaledValue;
|
||||
|
||||
// ===============================
|
||||
// Check for pressure difference
|
||||
// ===============================
|
||||
_xDeltaPSegmentInletToHigh := (ABS(_fbPressurePosolytSegmentInlet.rScaledValue - _fbPressureNegolytSegmentInlet.rScaledValue) > GVL_CONFIG.stUnitConfig.rMaxDeltaPSegmentInlet);
|
||||
_xReleaseSignalDeltaPSegment(
|
||||
xSignal:= _xDeltaPSegmentInletToHigh,
|
||||
xRelease:= _xEnableCheckForDeltaPSegmentInlet,
|
||||
timOnDelay:= T#5S,
|
||||
timOffDelay:= T#2S,
|
||||
xReleaseSignal=> _xErrorDeltaPSegmentInlet);
|
||||
|
||||
IF _xErrorDeltaPSegmentInlet THEN
|
||||
_xErrorActive := TRUE;
|
||||
END_IF
|
||||
|
||||
// ===============================
|
||||
// Check if all components are in automatic
|
||||
@@ -529,6 +559,7 @@ CASE _iState OF
|
||||
20: // Start pumps
|
||||
_fbPosolytPumpInlet.ReqAutomaticStart();
|
||||
_fbNegolytPumpInlet.ReqAutomaticStart();
|
||||
_xEnableCheckForDeltaPSegmentInlet := TRUE;
|
||||
_iState := 25;
|
||||
|
||||
25: // Wait for all pumps to run
|
||||
@@ -548,11 +579,15 @@ CASE _iState OF
|
||||
IF _tonStartupCheck.Q THEN
|
||||
_tonStartupCheck(In := FALSE);
|
||||
// Check for minimum unit voltage
|
||||
IF (_fbVoltageSegment.rScaledValue >= GVL_CONFIG.rMinimumUnitVoltage)
|
||||
AND NOT _xErrorActive
|
||||
AND NOT _xWarningActive THEN
|
||||
// (_fbVoltageSegment.rScaledValue >= GVL_CONFIG.rMinimumUnitVoltage) AND
|
||||
IF NOT _xErrorActive AND NOT _xWarningActive THEN
|
||||
xReady := TRUE;
|
||||
_xEnableVoltageLimitChecks := TRUE;
|
||||
|
||||
// Only enable Voltage Cheks if not in safety check mode
|
||||
IF NOT xInSafetyCheckMode THEN
|
||||
_xEnableVoltageLimitChecks := TRUE;
|
||||
END_IF
|
||||
|
||||
_iState := 35;
|
||||
ELSE
|
||||
_iState := 40;
|
||||
@@ -577,6 +612,7 @@ CASE _iState OF
|
||||
40: // Close all valves
|
||||
_fbNegolytValveTankOutlet.ReqAutomaticClose();
|
||||
_fbPosolytValveTankOutlet.ReqAutomaticClose();
|
||||
_xEnableCheckForDeltaPSegmentInlet := FALSE;
|
||||
_iState := 45;
|
||||
|
||||
45: // Wait for valves to be closed
|
||||
@@ -667,7 +703,12 @@ END_CASE
|
||||
// Output error and warning flags
|
||||
// ===============================
|
||||
xError := _xErrorActive;
|
||||
xWarning := _xWarningActive;]]></ST>
|
||||
xWarning := _xWarningActive;
|
||||
|
||||
// ===============================
|
||||
// Output all components in auto mode
|
||||
// ===============================
|
||||
xAllComponentsInAuto := _xAllComponentsInAutomatic;]]></ST>
|
||||
</Implementation>
|
||||
<Method Name="FB_init" Id="{08f1cd44-6483-4d20-ab45-d1938e8ec885}">
|
||||
<Declaration><![CDATA[METHOD FB_init : BOOL
|
||||
@@ -760,7 +801,18 @@ _fbNotAllAutomaticAlarm.ipArguments.Clear().AddString(_sName);]]></ST>
|
||||
<LineId Id="4937" Count="0" />
|
||||
<LineId Id="4635" Count="8" />
|
||||
<LineId Id="4620" Count="0" />
|
||||
<LineId Id="4644" Count="1" />
|
||||
<LineId Id="6068" Count="1" />
|
||||
<LineId Id="6253" Count="2" />
|
||||
<LineId Id="6070" Count="0" />
|
||||
<LineId Id="4644" Count="0" />
|
||||
<LineId Id="6071" Count="1" />
|
||||
<LineId Id="6079" Count="0" />
|
||||
<LineId Id="6081" Count="4" />
|
||||
<LineId Id="6080" Count="0" />
|
||||
<LineId Id="6088" Count="0" />
|
||||
<LineId Id="6075" Count="0" />
|
||||
<LineId Id="6089" Count="1" />
|
||||
<LineId Id="4645" Count="0" />
|
||||
<LineId Id="4414" Count="0" />
|
||||
<LineId Id="4647" Count="0" />
|
||||
<LineId Id="4646" Count="0" />
|
||||
@@ -775,21 +827,32 @@ _fbNotAllAutomaticAlarm.ipArguments.Clear().AddString(_sName);]]></ST>
|
||||
<LineId Id="5249" Count="0" />
|
||||
<LineId Id="4453" Count="10" />
|
||||
<LineId Id="5076" Count="0" />
|
||||
<LineId Id="4464" Count="6" />
|
||||
<LineId Id="4464" Count="5" />
|
||||
<LineId Id="6091" Count="0" />
|
||||
<LineId Id="4470" Count="0" />
|
||||
<LineId Id="4476" Count="15" />
|
||||
<LineId Id="4790" Count="0" />
|
||||
<LineId Id="4492" Count="1" />
|
||||
<LineId Id="4926" Count="1" />
|
||||
<LineId Id="4492" Count="0" />
|
||||
<LineId Id="5903" Count="0" />
|
||||
<LineId Id="4493" Count="0" />
|
||||
<LineId Id="4496" Count="0" />
|
||||
<LineId Id="5908" Count="0" />
|
||||
<LineId Id="5912" Count="0" />
|
||||
<LineId Id="5910" Count="0" />
|
||||
<LineId Id="4794" Count="0" />
|
||||
<LineId Id="4497" Count="12" />
|
||||
<LineId Id="5909" Count="0" />
|
||||
<LineId Id="4497" Count="0" />
|
||||
<LineId Id="5911" Count="0" />
|
||||
<LineId Id="4498" Count="11" />
|
||||
<LineId Id="4511" Count="1" />
|
||||
<LineId Id="5078" Count="0" />
|
||||
<LineId Id="5083" Count="0" />
|
||||
<LineId Id="5079" Count="0" />
|
||||
<LineId Id="5082" Count="0" />
|
||||
<LineId Id="5081" Count="0" />
|
||||
<LineId Id="4513" Count="7" />
|
||||
<LineId Id="4513" Count="3" />
|
||||
<LineId Id="6092" Count="0" />
|
||||
<LineId Id="4517" Count="3" />
|
||||
<LineId Id="5239" Count="0" />
|
||||
<LineId Id="4521" Count="5" />
|
||||
<LineId Id="5441" Count="0" />
|
||||
@@ -838,6 +901,9 @@ _fbNotAllAutomaticAlarm.ipArguments.Clear().AddString(_sName);]]></ST>
|
||||
<LineId Id="4549" Count="5" />
|
||||
<LineId Id="4556" Count="6" />
|
||||
<LineId Id="2754" Count="0" />
|
||||
<LineId Id="5747" Count="0" />
|
||||
<LineId Id="5746" Count="0" />
|
||||
<LineId Id="5748" Count="2" />
|
||||
</LineIds>
|
||||
<LineIds Name="FB_Unit.FB_init">
|
||||
<LineId Id="11" Count="0" />
|
||||
|
||||
Reference in New Issue
Block a user