103 lines
2.6 KiB
XML
103 lines
2.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<TcPlcObject Version="1.1.0.1">
|
|
<POU Name="MAIN" Id="{253d06d0-7abd-4394-b68c-5ffd2aaf348a}" SpecialFunc="None">
|
|
<Declaration><![CDATA[PROGRAM MAIN
|
|
VAR
|
|
_fbScheduler : FB_Scheduler;
|
|
|
|
_xInitDone : BOOL;
|
|
|
|
// Stations
|
|
_fbInput : FB_Input;
|
|
_fbEtcher : FB_Etcher;
|
|
_fbHVTest : FB_HVTest;
|
|
_fbOutput : FB_Output;
|
|
_fbNIO : FB_NIO;
|
|
|
|
// Transport
|
|
_fbRobot : FB_Robot;
|
|
|
|
// Job queue
|
|
_fbJobQueue : FB_JobQueue;
|
|
|
|
// Example recipe
|
|
_stRecipeSimple : ST_FlowRecipe;
|
|
|
|
_fbFlowRecHandler : FB_FlowRecHandler;
|
|
|
|
_xStart : BOOL;
|
|
END_VAR
|
|
]]></Declaration>
|
|
<Implementation>
|
|
<ST><![CDATA[IF (NOT _xInitDone) THEN
|
|
_xInitDone := TRUE;
|
|
A_Init();
|
|
END_IF
|
|
|
|
// Call all stations
|
|
_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(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
|
|
_fbScheduler.M_ClearStations();
|
|
|
|
_fbScheduler.M_Register(_fbInput);
|
|
_fbScheduler.M_Register(_fbEtcher);
|
|
_fbScheduler.M_Register(_fbHVTest);
|
|
_fbScheduler.M_Register(_fbOutput);
|
|
_fbScheduler.M_Register(_fbNIO);
|
|
|
|
// Register transport
|
|
_fbScheduler.M_RegisterTransport(_fbRobot);
|
|
|
|
|
|
// Create simple recipe
|
|
_stRecipeSimple.uiNodeCnt := 4;
|
|
|
|
// Process nodes
|
|
|
|
// 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>
|
|
</TcPlcObject> |