<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.12">
  <POU Name="FB_ValveMockup" Id="{547b8ab6-f6bc-4f02-ac80-4920749ff4eb}" SpecialFunc="None">
    <Declaration><![CDATA[FUNCTION_BLOCK FB_ValveMockup
VAR_INPUT
	xOpenValve AT %I* : BOOL;
	xCloseValve AT %I* : BOOL;
	
	xErrorOpen : BOOL := FALSE;
	xErrorClose : BOOL := FALSE;
END_VAR
VAR_OUTPUT
	xOpenFeedback AT %Q* : BOOL;
	xCloseFeedback AT %Q* : BOOL;
END_VAR
VAR
	_tonOpen : TON := (PT := T#2S);
	_tonClose : TON := (PT := T#2S);
END_VAR
]]></Declaration>
    <Implementation>
      <ST><![CDATA[// Timer for open and close feedback
_tonOpen(IN := xOpenValve);
_tonClose(IN := xCloseValve);

// Open and close feedback
xOpenFeedback := _tonOpen.Q AND (NOT xErrorOpen);
xCloseFeedback := _tonClose.Q AND (NOT xErrorClose);]]></ST>
    </Implementation>
    <LineIds Name="FB_ValveMockup">
      <LineId Id="54" Count="5" />
      <LineId Id="20" Count="0" />
    </LineIds>
  </POU>
</TcPlcObject>