First working implementation

- Currently only with one sided gripper
This commit is contained in:
2026-02-19 15:42:54 +01:00
parent 7126a7dd7e
commit 92276e4f4b
32 changed files with 1041 additions and 378 deletions

View File

@@ -14,8 +14,18 @@ VAR
_fbOutput : FB_Output;
_fbNIO : FB_NIO;
// Transport
_fbRobot : FB_Robot;
// Job queue
_fbJobQueue : FB_JobQueue;
// Example recipe
_stRecipeSimple : ST_Recipe;
_stRecipeSimple : ST_FlowRecipe;
_fbFlowRecHandler : FB_FlowRecHandler;
_xStart : BOOL;
END_VAR
]]></Declaration>
<Implementation>
@@ -25,18 +35,31 @@ END_VAR
END_IF
// Call all stations
_fbInput();
_fbEtcher();
_fbHVTest();
_fbOutput();
_fbNIO();
_fbInput(fbFlowRecHandler := _fbFlowRecHandler);
GVL_Product.axProductInStation[0] := _fbInput.P_HasProduct;
_fbEtcher(fbFlowRecHandler := _fbFlowRecHandler);
GVL_Product.axProductInStation[1] := _fbEtcher.P_HasProduct;
_fbHVTest(fbFlowRecHandler := _fbFlowRecHandler);
GVL_Product.axProductInStation[2] := _fbHVTest.P_HasProduct;
_fbOutput(fbFlowRecHandler := _fbFlowRecHandler);
GVL_Product.axProductInStation[3] := _fbOutput.P_HasProduct;
_fbNIO(fbFlowRecHandler := _fbFlowRecHandler);
GVL_Product.axProductInStation[4] := _fbNIO.P_HasProduct;
// Call scheduler
_fbScheduler();]]></ST>
_fbScheduler(fbFlowRecHandler := _fbFlowRecHandler, fbJobQueue := _fbJobQueue);
// Call robot transport
_fbRobot(fbJobQueue := _fbJobQueue, fbScheduler := _fbScheduler);]]></ST>
</Implementation>
<Action Name="A_Init" Id="{203d4406-b6da-4e3d-8378-ac96a0e18ff2}">
<Implementation>
<ST><![CDATA[// Register stations to scheduler
<ST><![CDATA[// // Register stations to scheduler
_fbScheduler.M_ClearStations();
_fbScheduler.M_Register(_fbInput);
@@ -45,26 +68,35 @@ _fbScheduler.M_Register(_fbHVTest);
_fbScheduler.M_Register(_fbOutput);
_fbScheduler.M_Register(_fbNIO);
// Register transport
_fbScheduler.M_RegisterTransport(_fbRobot);
// Create simple recipe
_stRecipeSimple.uiRecipeID := 1;
_stRecipeSimple.uiStartNode := 0;
_stRecipeSimple.uiNodeCnt := 3;
_stRecipeSimple.uiNodeCnt := 4;
// Process nodes
_stRecipeSimple.astNodes[0].uiNodeID := 1;
_stRecipeSimple.astNodes[0].dwReqCap := 16#0001;
_stRecipeSimple.astNodes[0].uiTransCnt := 1;
_stRecipeSimple.astNodes[0].astTransitions[0].eCondition := E_TransitCond.ALWAYS;
_stRecipeSimple.astNodes[0].astTransitions[0].uiNextNodeID := 1;
_stRecipeSimple.astNodes[1].uiNodeID := 1;
_stRecipeSimple.astNodes[1].dwReqCap := 16#0001;
_stRecipeSimple.astNodes[1].uiTransCnt := 2;
_stRecipeSimple.astNodes[1].astTransitions[0].eCondition := E_TransitCond.RESULT_OK;
_stRecipeSimple.astNodes[1].astTransitions[0].uiNextNodeID := 3;
_stRecipeSimple.astNodes[1].astTransitions[1].eCondition := E_TransitCond.RESULT_NIO;
_stRecipeSimple.astNodes[1].astTransitions[1].uiNextNodeID := 4;]]></ST>
// Etching
_stRecipeSimple.astNodes[0].dwReqCap := 16#0001;
_stRecipeSimple.astNodes[0].iNextNodeSuccess := 1;
_stRecipeSimple.astNodes[0].iNextNodeFail := 3;
// HV Testing
_stRecipeSimple.astNodes[1].dwReqCap := 16#0002;
_stRecipeSimple.astNodes[1].iNextNodeSuccess := 2;
_stRecipeSimple.astNodes[1].uiMaxRetries := 1;
_stRecipeSimple.astNodes[1].iNextNodeRetry := 0;
_stRecipeSimple.astNodes[1].iNextNodeFail := 3;
// Output
_stRecipeSimple.astNodes[2].dwReqCap := 16#0004;
// NIO
_stRecipeSimple.astNodes[3].dwReqCap := 16#0008;
// Set flow recipe in input station
_fbInput.M_SetRecipe(_stRecipeSimple);]]></ST>
</Implementation>
</Action>
</POU>