L_TC2P_CmdAckRequest

 

 

 

L_TC2P_CmdAckRequest

 

 

 

 

 

 

 

 

 

 

 

L_TC2P_CoordinatedMotion

–

 

itfCommandReceiver

xCmdAccepted

 

–

BOOL

 

 

 

 

 

 

 

 

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

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.

Acknowledgement

The L_TC2P_CmdAckRequest command is used to acknowledge the logical commands.

With the call of the method Execute() of the command L_TC2P_AckRequestCommand exactly one request for acknowledgement is sent. The multiple call of the Execute method, also within a PLC clock, instructs the multiple acknowledgement. This results in two following possibilities:

  • The command order list contains several commands that can be acknowledged. In this case, the list is searched according to the processing sequence. The first command which can be acknowledge will be acknowledge. Reset of the command will stay in the list.

  • There is no command in the command order list that can be acknowledged. The acknowledgement goes nowhere. This means that no function is acknowledged.

The following commands can be acknowledged:

  • L_TC2P_CmdWaitTime

Command L_TC2P_CmdWaitTime

The early acknowledgement of the waiting time can be activated via the command L_TC2P_AckRequestCommand. 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.

 

Example: Acknowledgement of a breakpoint

In the following example the four commands are activated in the same PLC cycle (call of the Execute() method).

The path consists of a total of three intermediate points. At the second point the path should be stopped and wait for the acknowledgement. For the approach of the points the Geometry command L_TC2P_CmdMoveLinearAbsolute is used. The approach to the point 1 and to the point 2 is instructed by calling the method Execute() at the command L_TC2P_CmdMoveLinearAbsolute With the command L_TC2P_CmdWaitTime the waiting time in point 2 is set. Thus the point 2 is a breakpoint. With the negative value Cmd_MoveWait.lrWaitTime < 0 the waiting time of infinity is set. The path is held at point 2 until it is acknowledged with the command L_TC2P_CmdAckRequest. The approach to point 3 is also done with the command L_TC2P_CmdMoveLinearAbsolute.

VAR

    /// Technology module:

    TM_CoordMotion: L_TC2P_CoordinatedMotionState;

    /// Commands:

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

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

    Cmd_AckRequest : L_TC2P_CmdAckRequest 
                   :=( itfCmdReceiver := TM_CoordMotion);

    /// state

    wState : WORD;

    /// acknowledgement of the waiting time:

    xAcknowledge : BOOL;

END_VAR

CASE  wState OF

10: /// send command of 3x points

    /// 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]    := 150;   // x pos

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

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

    Cmd_MoveLinAbs.Execute();

 

    /// execute wait time

    Cmd_MoveWait.lrWaitTime          := -1; 

    Cmd_MoveWait.Execute(); 

 

    /// execute point 3

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

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

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

    Cmd_MoveLinAbs.Execute();

 

    wState := 20;

 

20: /// wait for acknowledge

    IF xAcknowledge THEN
    /// execute the command for acknowledge the wait time
        command

    Cmd_AckRequest.Execute();

 

    wState := 30;

 

    END_IF

 

END_CASE