L_TC2P_CmdWaitTime

 

 

 

L_TC2P_CmdWaitTime

 

 

 

 

 

 

 

 

 

 

 

L_TC2P_CoordinatedMotion

–

 

itfCommandReceiver

xCmdAccepted

 

–

BOOL

LREAL

–

 

lrWaitTime

 

 

 

 

 

 

 

 

 

 

 

 

Inputs

Identifier

Data type

Description

itfCmdReceiver

L_TC2P_CoordinatedMotionState

L_TX2P_PickAndPlaceBase

Connection to the technology module - which interprets the command and executes the job/driving task.

  • L_TC2P_CoordinatedMotionState

  • L_TX2P_PickAndPlaceBase

lrWaitTime    

LREAL

Setting of the wait time. The wait time is activated as soon as the target point of the geometry command is reached before the WaitTime. The path is held in the target point until

  • The waiting time has expired

  • Or a premature acknowledgement was made via the command L_TC2P_CmdAckRequest.Execute().

 

The setting lrWaitTime < 0 is interpreted as infinite time. Thus the trajectory is held as long as the acknowledgement via the command L_TC2P_CmdAckRequest.Execute() has taken place.

  • Unit: [s]

  • Default: lrWaitTime ;= 0

Outputs

Identifier

Data type

Description

xCmdAccepted

BOOL

TRUE

The command is valid and will be included in CmdReceiver.

Method

Identifier

Data type

Description

METHOD Execute : Bool

Release of the order for the execution of the command.

TRUE

The command is valid and will be included in CmdReceiver.

FALSE

The command is not valid because no CmdReceiver is connected.

Activate the command:

Each command has the method Execute().

To execute the command, the "Execute()" method must be called. The method has the return value of data type BOOL. The return value = TRUE is set if a valid command receiver is connected to the itfCmdReceiver input.

With the command L_TC2P_CmdWaitTime a wait point respectively a break point is defined in the path. The TM L_TC2P_CoordinatedMotion changes to the state WAITTIME, if the motion task of the command is active.

If motion tasks are already executed in the TM L_TC2P_CoordinatedMotion, the motion task from the currently assigned command is added at the end of the waiting list. The waiting list is processed after the order.

The trajectory will be stopped in the target points of the geometry command that has been assigned to the waiting list of the technology module before the command L_TC2P_CmdWaitTime .

Acknowledgement

Continuation of travel on the path takes place automatically when the lrWaitTime in [s] has expired or early acknowledgement is activated via the L_TC2P_AckRequestCommand command. For this the method Execute() of the command L_TC2P_AckRequestCommand must be called. The waiting time is acknowledged in the same PLC cycle. The command L_TC2P_CmdWaitTime can also be acknowledged prematurely, before the path arrives at the destination point.

The functions lrOverride and xPause have no influence on the waiting time.

Infinite waiting time

With the setting lrWaitTime < 0 (example: lrWaitTime = -1) an infinite waiting time is defined. With this the path is held until the acknowledgement with the command L_TC2P_AckRequestCommand takes place.

Grouping of the commands

If several commands are activated in the same PLC clock. So these are concatenated in a path as a group. The call sequence of the Execute() method of the commands decides the processing sequence.

 

There are 3x points in the profile with the CmdMoveLin : L_TC2P_ L_TC2P_MoveLinearAbsoluteCommand enabled.

The after activating the second profile point the Logic command CmdWaitTime is activated by calling the Execute() method.

The path is thus stopped at the second destination point.

After the waiting time lrTime of the command CmdWaitTime has elapsed, the journey continues on the path to the third destination point

.

VAR

    /// Technology module:

    TM_CoordMotion: L_TC2P_CoordinatedMotionState;

     /// Commands:

    Cmd_ProfilePar   : L_TC2P_CmdBasicProfileParameter 
                       :=( itfCmdReceiver := TM_CoordMotion);

    Cmd_MoveLinAbs   : L_TC2P_CmdMoveLinearAbsolute 
                       :=( itfCmdReceiver := TM_CoordMotion);

    Cmd_WaitTime     : L_TC2P_CmdWaitTime 
                       :=( itfCmdReceiver := TM_CoordMotion);

 

    /// state

    wState : WORD;

END_VAR

CASE  wState OF

10: /// send command of 3x points

 

    /// set profile parameters

    Cmd_ProfilePar.lrPathVel        := 100;

    Cmd_ProfilePar.lrPathAcc        := 1000;

    Cmd_ProfilePar.lrPathDec        := 1000;

    Cmd_ProfilePar.lrPathJerk       := 100000;

    Cmd_ProfilePar.Execute();

 

    /// general parameters for move linear abs

    Cmd_MoveLinAbs.lrBlendingRadius := 50;

    Cmd_MoveLinAbs. eCoordSystem    := L_MC4P_CoordSystem.WCS;

 

    /// execute point 1

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

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

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

    Cmd_MoveLinAbs.Execute();

    /// execute point 2

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

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

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

    Cmd_MoveLinAbs.Execute();

 

    /// execute wait time 2s

    Cmd_WaitTime.lrWaitTime         := 2.0; /// 2s

    Cmd_WaitTime.Execute();

 

    //// execute point 3

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

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

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

    Cmd_MoveLinAbs.Execute();

 

    wState := 20;

 

END_CASE