VAL_Move

VAL_Move 1:

FUNCTION_BLOCK VAL_Move

This function block allows to command a motion to the specified end position located inside a database on robot side.

When FirstPointIdx and LastPointIdx parameters are different, the robot will move along the path defined by the points located in the bank between these 2 indexes. If LastPointIdx is not specified or equal to FirstPointIdx, the function block command a single movement to the point index defined by FirstPointIdx parameter.

Example: One supposes that there are 6 points defined in the bank number 2 of a database
If FirstPointIdx is equal 0 and LastPointIdx is equal 4, the robot will move along a path defined by the points with indexes 0-1-2-3-4
If FirstPointIdx is equal 5 and LastPointIdx is equal 0, the robot will move along a path defined by the points with indexes 5-4-3-2-1-0

Syntax

Definition:

FUNCTION_BLOCK VAL_Move
VAR_INPUT
    Execute         : BOOL := FALSE;
    UserDatabase    : BOOL := FALSE;
    JointPosition   : BOOL := FALSE;
    InterpolateJ    : BOOL := FALSE;
    EnableBlending  : BOOL := FALSE;
    BankID          : INT := -1;
    FirstPointIdx   : INT := -1;
    LastPointIdx    : INT := -1;
    ToolIdx         : INT := -1;
    MdescIdx        : INT := -1;
END_VAR
VAR_OUTPUT
    Busy        : BOOL := FALSE;
    Done        : BOOL := FALSE;
    Error       : BOOL := FALSE;
    ErrorID     : UDINT := 0;
    MovementID  : INT := -1;
END_VAR
VAR_IN_OUT
    AxesGroup  : T_StaeubliRobot;
END_VAR

VAL_Move 2: Inputs

Name

Type

Description

Execute

BOOL

Rising edge triggers function execution

UserDatabase

BOOL

True=Use user database; False=Use plc database

JointPosition

BOOL

True=move to joint position; False= move to a cartesian position

InterpolateJ

BOOL

True=Joint interpolated movement; False=Linear movement

EnableBlending

BOOL

True=use blending parameter of motion descriptor; False= robot stops at destination.

BankID

INT

Number of the bank in which the point is located. Relevant only when moving on Cartesian position

FirstPointIdx

INT

Index of the first Joint or Point data in the selected bank

LastPointIdx

INT

Index of the last Joint or Point data in the selected bank.

ToolIdx

INT

Index of the tool position in the bank

MdescIdx

INT

Index of the motion descriptor in the bank.

VAL_Move 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

This output is set when function block has terminated with error

ErrorID

UDINT

Error code

MovementID

INT

Identifier for this commanded movement

VAL_Move 4:/VAL_Move 5: Inputs/Outputs

Name

Type

Description

AxesGroup

T_StaeubliRobot

Data block for a robot