Projektdateien hinzufügen.
This commit is contained in:
111
PLC_SIM/POUs/FB_UnitMockup.TcPOU
Normal file
111
PLC_SIM/POUs/FB_UnitMockup.TcPOU
Normal file
@@ -0,0 +1,111 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.12">
|
||||
<POU Name="FB_UnitMockup" Id="{a1155b26-00e6-4710-a8e4-140d6d5cd082}" SpecialFunc="None">
|
||||
<Declaration><![CDATA[FUNCTION_BLOCK FB_UnitMockup
|
||||
VAR_INPUT
|
||||
END_VAR
|
||||
VAR_OUTPUT
|
||||
END_VAR
|
||||
VAR
|
||||
// Valves posolyt
|
||||
_fbPosolytValveTankOutlet : FB_ValveMockup;
|
||||
|
||||
// Valves negolyt
|
||||
_fbNegolytValveTankOutlet : FB_ValveMockup;
|
||||
|
||||
// Pumps posolyt
|
||||
_fbPosolytPumpInlet : FB_MotorMockup;
|
||||
|
||||
// Pumps negolyt
|
||||
_fbNegolytPumpInlet : FB_MotorMockup;
|
||||
|
||||
|
||||
// Pressure sensors posolyt
|
||||
_fbPressurePosolytSegmentInlet : FB_AnalogSensorMockup;
|
||||
_fbPressurePosolytTankInlet : FB_AnalogSensorMockup;
|
||||
|
||||
|
||||
// Pressure sensors negolyt
|
||||
_fbPressureNegolytSegmentInlet : FB_AnalogSensorMockup;
|
||||
_fbPressureNegolytTankInlet : FB_AnalogSensorMockup;
|
||||
|
||||
// Helping variables
|
||||
_xFlowThroughtSegmentPosolyt : BOOL;
|
||||
_xFlowThroughtBypassPosolyt : BOOL;
|
||||
|
||||
_xFlowThroughtSegmentNegolyt : BOOL;
|
||||
_xFlowThroughtBypassNegolyt : BOOL;
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[// Valves posolyt
|
||||
_fbPosolytValveTankOutlet();
|
||||
|
||||
// Valves negolyt
|
||||
_fbNegolytValveTankOutlet();
|
||||
|
||||
// Pumps posolyt
|
||||
_fbPosolytPumpInlet();
|
||||
|
||||
// Pumps negolyt
|
||||
_fbNegolytPumpInlet();
|
||||
|
||||
// Simulate flow posolyt
|
||||
_xFlowThroughtSegmentPosolyt := _fbPosolytPumpInlet.xEnable AND _fbPosolytValveTankOutlet.xOpenFeedback;
|
||||
_xFlowThroughtBypassPosolyt := _fbPosolytPumpInlet.xEnable AND NOT _fbPosolytValveTankOutlet.xOpenFeedback;
|
||||
|
||||
_xFlowThroughtSegmentNegolyt := _fbNegolytPumpInlet.xEnable AND _fbNegolytValveTankOutlet.xOpenFeedback;
|
||||
_xFlowThroughtBypassNegolyt := _fbNegolytPumpInlet.xEnable AND NOT _fbNegolytValveTankOutlet.xOpenFeedback ;
|
||||
|
||||
// Pressure sensors posolyt
|
||||
_fbPressurePosolytSegmentInlet(
|
||||
xEnable:= _xFlowThroughtSegmentPosolyt,
|
||||
rOnValue:= 0.487,
|
||||
rOffValue:= 0.0,
|
||||
rNoise:= 0.002,
|
||||
rMinValue:= -1.0,
|
||||
rMaxValue:= 1.5);
|
||||
|
||||
_fbPressurePosolytTankInlet(
|
||||
xEnable:= _xFlowThroughtSegmentPosolyt,
|
||||
rOnValue:= 0.0429,
|
||||
rOffValue:= 0.0,
|
||||
rNoise:= 0.002,
|
||||
rMinValue:= -1.0,
|
||||
rMaxValue:= 1.5);
|
||||
|
||||
// Pressure sensors negolyt
|
||||
_fbPressureNegolytSegmentInlet(
|
||||
xEnable:= _xFlowThroughtSegmentNegolyt,
|
||||
rOnValue:= 0.487,
|
||||
rOffValue:= 0.0,
|
||||
rNoise:= 0.002,
|
||||
rMinValue:= -1.0,
|
||||
rMaxValue:= 1.5);
|
||||
|
||||
_fbPressureNegolytTankInlet(
|
||||
xEnable:= _xFlowThroughtSegmentNegolyt,
|
||||
rOnValue:= 0.0429,
|
||||
rOffValue:= 0.0,
|
||||
rNoise:= 0.002,
|
||||
rMinValue:= -1.0,
|
||||
rMaxValue:= 1.5);
|
||||
]]></ST>
|
||||
</Implementation>
|
||||
<LineIds Name="FB_UnitMockup">
|
||||
<LineId Id="482" Count="1" />
|
||||
<LineId Id="486" Count="2" />
|
||||
<LineId Id="491" Count="2" />
|
||||
<LineId Id="495" Count="2" />
|
||||
<LineId Id="499" Count="2" />
|
||||
<LineId Id="695" Count="3" />
|
||||
<LineId Id="502" Count="8" />
|
||||
<LineId Id="519" Count="7" />
|
||||
<LineId Id="568" Count="3" />
|
||||
<LineId Id="699" Count="3" />
|
||||
<LineId Id="576" Count="0" />
|
||||
<LineId Id="585" Count="7" />
|
||||
<LineId Id="600" Count="0" />
|
||||
</LineIds>
|
||||
</POU>
|
||||
</TcPlcObject>
|
||||
Reference in New Issue
Block a user