VAL_SetMovementID

VAL_SetMovementID 1:

FUNCTION_BLOCK VAL_SetMovementID

This instruction changes the movement ID for the next commanded movement. It is useful to arrange so that the same path always uses the same movement ID values.
After execution of MC_GroupStop(), the movement ID is automatically reset to 0.
After executing this function block, the relation between the movement ID set and the ID of the movement in progress may become uncertain:

Several commanded movements may then have the same movement id. This function block should therefore not give a value that is also the movement ID of a pending move command.
To finish, this is highly recommended to execute this function when robot is NOT moving

Syntax

Definition:

FUNCTION_BLOCK VAL_SetMovementID
VAR_INPUT
    Execute     : BOOL := FALSE;
    MovementID  : INT := -1;
END_VAR
VAR_OUTPUT
    Busy     : BOOL := FALSE;
    Done     : BOOL := FALSE;
    Error    : BOOL := FALSE;
    ErrorID  : UDINT := 0;
END_VAR
VAR_IN_OUT
    AxesGroup  : T_StaeubliRobot;
END_VAR

VAL_SetMovementID 2: Inputs

Name

Type

Description

Execute

BOOL

Rising edge triggers function execution

MovementID

INT

Value for setting movement ID on robot side

VAL_SetMovementID 3: Outputs

Name

Type

Description

Busy

BOOL

Set when function block is executing. Reset when Done or Error is set

Done

BOOL

This output is set when function block has terminated with success

Error

BOOL

s when function block has terminated with error

ErrorID

UDINT

Error code

VAL_SetMovementID 4:/VAL_SetMovementID 5: Inputs/Outputs

Name

Type

Description

AxesGroup

T_StaeubliRobot

Data block for a robot