Example: Decoupling (rotary table)
Following the example of (Example: Coupling(rotary table)(157)) should now be decoupled to a point in the WCS.
The lift-off movement with the object must be synchronized with the RT1. Disengagement must only start with the target movement.
VAR
/// Technology module:
TM_CoordMotion : L_TC2P_CoordinatedMotionState;
/// tracking object
TrackingObject : L_TC2P_RotaryTrackingObject;
/// Commands:
Cmd_ProfilePar : L_TC2P_CmdBasicProfileParameter
:=(itfCmdReceiver := TM_CoordMotion);
Cmd_SyncInStart : L_TC2P_CmdSyncInStart
:=(itfCmdReceiver := TM_CoordMotion);
Cmd_SyncOutStart : L_TC2P_CmdSyncOutStart
:=(itfCmdReceiver := TM_CoordMotion);
Cmd_SyncEnd : L_TC2P_CmdSyncEnd
:=(itfCmdReceiver := TM_CoordMotion);
Cmd_MoveLinAbs : L_TC2P_CmdMoveLinearAbsolute
:=(itfCmdReceiver := TM_CoordMotion);
/// state
wState : WORD;
END_VAR
CASE wState OF
110:
/// set profile parameters
Cmd_ProfilePar.lrPathVel := 100;
Cmd_ProfilePar.lrPathAcc := 1000;
Cmd_ProfilePar.lrPathDec := 1000;
Cmd_ProfilePar.lrPathJerk := 100000;
Cmd_ProfilePar.Execute();
/// execute point 5
Cmd_MoveLinAbs.lrBlendingRadius := 20;
Cmd_MoveLinAbs.eCoordSystem := L_MC4P_CoordSystem.PCS_1;
Cmd_MoveLinAbs.alrPosition[1] := 0; // x pos
Cmd_MoveLinAbs.alrPosition[2] := 0; // y pos
Cmd_MoveLinAbs.alrPosition[3] := 100; // z pos
Cmd_MoveLinAbs.Execute();
/// start sync in start
Cmd_SyncOutStart.lrOffset := 0;
Cmd_SyncOutStart.Execute();
/// execute point 6
Cmd_MoveLinAbs.lrBlendingRadius := 20;
Cmd_MoveLinAbs.eCoordSystem := L_MC4P_CoordSystem.WCS;
Cmd_MoveLinAbs.alrPosition[1] := 100; // x pos
Cmd_MoveLinAbs.alrPosition[2] := 50; // y pos
Cmd_MoveLinAbs.alrPosition[3] := 100; // z pos
Cmd_MoveLinAbs.Execute();
/// execute point 7
Cmd_MoveLinAbs.lrBlendingRadius := 20;
Cmd_MoveLinAbs.eCoordSystem := L_MC4P_CoordSystem.WCS;
Cmd_MoveLinAbs.alrPosition[1] := 100; // x pos
Cmd_MoveLinAbs.alrPosition[2] := 50; // y pos
Cmd_MoveLinAbs.alrPosition[3] := 0; // z pos
Cmd_MoveLinAbs.Execute();
/// start sync in end
Cmd_SyncEnd.lrOffset := 0;
Cmd_SyncEnd.Execute();
wState := 120;
END_CASE