VAL_MoveRelative

VAL_MoveRelative 1:

FUNCTION_BLOCK VAL_MoveRelative

This function block allows to commands a movement to a position calculated with specified offsets from a point located in a bank of a database.

The offset might be applied in the following coordinate system:

Syntax

Definition:

FUNCTION_BLOCK VAL_MoveRelative
VAR_INPUT
    Execute         : BOOL := FALSE;
    InterpolateJ    : BOOL := FALSE;
    EnableBlending  : BOOL := FALSE;
    UserDatabase    : BOOL := FALSE;
    BankID          : INT := -1;
    PointIdx        : INT := -1;
    ToolIdx         : INT := -1;
    MdescIdx        : INT := -1;
    Offsets         : T_Trsf;
    ShiftInFrame    : BOOL := FALSE;
    Uframe          : 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_MoveRelative 2: Inputs

Name

Type

Description

Execute

BOOL

Rising edge triggers function execution

InterpolateJ

BOOL

True=Joint interpolated movement; False=Linear movement

EnableBlending

BOOL

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

UserDatabase

BOOL

True=Use user database; False=Use plc database

BankID

INT

Number of the bank in which the point is located

PointIdx

INT

Index of the Point data in the bank

ToolIdx

INT

Index of the Tool in the bank to use for the commanded movement

MdescIdx

INT

Index of the motion descriptor in the bank.

Offsets

T_Trsf

Relative distances in each dimensions for approaching the end-position.

ShiftInFrame

BOOL

True= Offset are applied in user frame. False= Offset are applied in Tool (default)

Uframe

INT

Index of the user frame in which offsets are applied. This parameter is effective when parameter ShiftInFrame is True.
If not specified, the offsets are applied in the user frame associated to the specified bankID

VAL_MoveRelative 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_MoveRelative 4:/VAL_MoveRelative 5: Inputs/Outputs

Name

Type

Description

AxesGroup

T_StaeubliRobot

Data block for a robot