Example: Re-coupling rotary table RT1 to another rotary table RT2

According to the example(Example: Coupling (rotary table)(157)) is now to be coupled to an object on the rotary table RT2. The lift-off movement with the object must be synchronized with the rotary table RT1. During the lowering movement on the rotary table RT2, the TCP must already be moving synchronously.

VAR

    /// Technology module:

    TM_CoordMotion    : L_TC2P_CoordinatedMotionState;

    /// tracking object

    TrackingObject    : L_TC2P_RotaryTrackingObject;

    TrackingObjectOut : 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();

 

    /// set tracking object

    TrackingObjectOut.itfRotaryTable := OuteedAxis; /// Rotary table axis_ref

 

    /// coordinaten System rotary table origin

    TrackingObjectOut.alrRotaryTableOrigin[1] := 100;

    TrackingObjectOut.alrRotaryTableOrigin[2] := 50;

    TrackingObjectOut.alrRotaryTableOrigin[3] := 0;

    TrackingObjectOut.alrRotaryTableOrigin[6] := 0;

 

    /// object coordinaten in the coordinaten System rotary table origin

    TrackingObject.alrInitialObjectPosition[1] := 600;

    TrackingObject.alrInitialObjectPosition[2] := 75;

    TrackingObject.alrInitialObjectPosition[3] := 10;

 

    /// 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_SyncInStart.itfTrackingObject := TrackingObjectOut;

    Cmd_SyncInStart.lrOffset          := 0;

    Cmd_SyncInStart.Execute();

 

    /// execute point 6

    Cmd_MoveLinAbs.lrBlendingRadius := 20;  

    Cmd_MoveLinAbs.eCoordSystem     := L_MC4P_CoordSystem.PCS_2;  

    Cmd_MoveLinAbs.alrPosition[1]   := 100; // x pos

    Cmd_MoveLinAbs.alrPosition[2]   := 0;   // y pos

    Cmd_MoveLinAbs.alrPosition[3]   := 0;   // z pos

    Cmd_MoveLinAbs.Execute();

 

    /// execute point 7

    Cmd_MoveLinAbs.lrBlendingRadius := 20;  

    Cmd_MoveLinAbs.eCoordSystem     := L_MC4P_CoordSystem.PCS_2;

    Cmd_MoveLinAbs.alrPosition[1]   := 0; // x pos

    Cmd_MoveLinAbs.alrPosition[2]   := 0; // y pos

    Cmd_MoveLinAbs.alrPosition[3]   := 0; // z pos

    Cmd_MoveLinAbs.Execute();

 

    /// start sync in end

   Cmd_SyncEnd.lrOffset := 30;

   Cmd_SyncEnd.Execute();

 

    wState := 120;

 

END_CASE