Files
infineon_scheduler/PLC/POUs/Stations/FB_Input.TcPOU
m.heisig 92276e4f4b First working implementation
- Currently only with one sided gripper
2026-02-19 15:42:54 +01:00

40 lines
1.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1">
<POU Name="FB_Input" Id="{d51b3f46-877e-4234-99b6-53eb690c6bdc}" SpecialFunc="None">
<Declaration><![CDATA[FUNCTION_BLOCK FB_Input EXTENDS FB_BaseStation
VAR_INPUT
END_VAR
VAR_OUTPUT
END_VAR
VAR
_tonNewProductReady : TON;
_stFlowRecipe : ST_FlowRecipe;
_xRecipeSet : BOOL;
_xStart : BOOL;
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[_tonNewProductReady(IN := ((NOT _xProdAvail) AND _xRecipeSet AND _xStart), PT := T#5S);
IF _tonNewProductReady.Q THEN
_iFlowRecIdx := fbFlowRecHandler.M_AddFlowRec(stFlowRecipe := _stFlowRecipe);
// Todo create additional recipe data in pool array where the index
// is the same as _iFlowRecIdx
_xProdAvail := TRUE;
END_IF]]></ST>
</Implementation>
<Method Name="M_SetRecipe" Id="{58f2ee2a-65a7-4788-a8f6-1e5a7ab222c9}">
<Declaration><![CDATA[METHOD M_SetRecipe
VAR_INPUT
stRecipe : ST_FlowRecipe;
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[_stFlowRecipe := stRecipe;
_xRecipeSet := TRUE;]]></ST>
</Implementation>
</Method>
</POU>
</TcPlcObject>