L_TC2P_CmdMoveLinearRelative

 

 

 

 

L_TC2P_CmdMoveLinearRelative

 

 

 

 

 

 

 

 

 

 

 

L_TC2P_CoordinatedMotion

 

–

 

itfCmdReceiver

xCmdAccepted

 

–

BOOL

ARRAY[1..12] OF LREAL

–

 

alrDistance

 

 

 

 

L_MC4P_CoordSystem

–

 

eCoordSystem

 

 

 

 

ARRAY[1..6] OF L_MC4P_AuxMode

–

 

aeAuxMode

 

 

 

 

L_MC4P_Orientation_Mode

–

 

eOrientationMode

 

 

 

 

ARRAY[1..6] OF MC_DIRECTION

–

 

aeDirection

 

 

 

 

 

 

 

 

 

 

 

 

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

alrDistance

ARRAY[1..12] OF LREAL

Array with relative target coordinates in [Units].

  • Related to the target position at the start time of the command.

  • For chained movements: Related to the target position of the previous movement

Relative target position of the movement

  • Index 1 ... 6:

    • Coordsystem = ACS: Target position of the drive axes

    • Coordsystem = WCS, MCS oder PCS: Target position of the TCP in the selected coordinate system.

  • Index 7 ... 12:

    • Target position of the optionally available auxiliary axes

eCoordSystem

L_MC4P_CoordSystem

Selection of the coordinate system to be used:

  • WCS: World Coordinate System

  • MCS: Machine Coordinate System

  • ACS: Axes Coordinate System

  • PCS_1 ... PCS_16: Product Coordinate System (1 ... 16)

eOrientationMode

L_MC4P_Orientation_Mode

Presetting the orientation interpolation for the WCS axes

  • ShortestSpacialWay: The target orientation is approached in such a way that the shortest possible solid angle results for the sum of the movements. For 4D kinematics this is equivalent to mcShortestWay for the C axis. (default)

  • AxisIndividual: The direction of movement can be specified independently for each orientation axis via the Direction input.

  • Initial value: ShortestSpacialWay

 

See also:Direction specification for modulo axes

aeDirection

ARRAY[1..6] OF MC_DIRECTION

Direction specification for WCS rotary axes (A, B, C axis), which are parameterized as modulo.

The parameter is evaluated only with
eOrientationMode:= L_MC4P_Orientation_Mode.AxisIndividual.

For MoveLinear movements only the indices 4 ... 6 (main axes A, B, C) are used.

Permissible selection:

  • mcPositiveDirection: Positive direction

  • mcNegativeDirection: Negative direction

  • mcShortestWay: Shortest path (default)

The mcCurrentDirection, mcPositiveCycle and mcNegativeCycle modes are not supported.

 

See also:Direction specification for modulo axes (^ 700)

aeAuxMode

ARRAY[1..6] OF L_MC4P_AuxMode

Mode for the auxiliary axes:

  • Inactive: Auxiliary object coordinates are ignored.

  • Continuous: Looping of the auxiliary axis over several MC_Move blocks.

  • DiscreteAbsolute: Auxiliary object position is set at the end of each motion segment (similar to main axes).

  • DiscreteRelative: Auxiliary object position is set at the end of each motion segment (similar to main axes).

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.

The TM L_TC2P_CoordinatedMotion changes to the state MOVELINREL, 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 target position is determined by the position from which the order starts and the path from the input alrDistance.

Blending

To enable path blending at the target position, the L_TC2P_CmdBlendingRadius or L_TC2P_CmdBlendingPct command must be activated.

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.

VAR

/// Technology Module:

TM_CoordMotion : L_TC2P_CoordinatedMotionState;

/// commands:

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

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

Cmd_MoveLinRel: L_TC2P_ CmdMoveLinearRelative :=( itfCmdReceiver := TM_CoordMotion);

Cmd_MoveDirAbs: L_TC2P_CmdMoveDirectAbsolute :=( itfCmdReceiver := TM_CoordMotion);

 

END_VAR

/// send command

/// general parameters for move linear abs

Cmd_BasicPar.lrPathVel := 100; // vel

Cmd_BasicPar.lrPathAcc := 1000; // acc

Cmd_BasicPar.lrPathDec := 1000; // dec

Cmd_BasicPar.lrPathJerk := 0; // jerk

Cmd_BasicPar.Execute();

Cmd_MoveLinAbs.eCoordSystem := L_MC4P_CoordSystem.WCS;

Cmd_MoveLinRel.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_MoveLinRel.alrDistance[1] := 50; // x pos

Cmd_MoveLinRel.alrDistance[2] := 0; // y pos

Cmd_MoveLinRel.alrDistance[3] := -50; // z pos

Cmd_MoveLinRel.Execute();

 

//// execute point 3

Cmd_MoveLinRel.alrDistance[1] := 50; // x pos

Cmd_MoveLinRel.alrDistance[2] := 0; // y pos

Cmd_MoveLinRel.alrDistance[3] := 30; // z pos

Cmd_MoveLinRel.Execute();

 

//// Additional points in the wheelbase

Cmd_MoveDirAbs.alrPosition[1] := 45; // x pos

Cmd_MoveDirAbs.alrPosition[2] := 45; // y pos

Cmd_MoveDirAbs.alrPosition[3] := 45; // z pos

Cmd_MoveDirAbs.Execute();