First working implementation
- Currently only with one sided gripper
This commit is contained in:
@@ -1,16 +1,40 @@
|
||||
<?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_StationBase
|
||||
<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[]]></ST>
|
||||
<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>
|
||||
Reference in New Issue
Block a user