VAL_SetMovementID
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
Inputs
Name | Type | Description |
---|---|---|
Execute | BOOL | Rising edge triggers function execution |
MovementID | INT | Value for setting movement ID on robot side |
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 |