VAL_ShiftPoint

VAL_ShiftPoint 1:

FUNCTION_BLOCK VAL_ShiftPoint

This function block computes a new cartesian position by applying a geometrical transformation.The geometrical transformation specified by ‘Offsets’ parameter can be applied relative to different coordinate systems :

Syntax

Definition:

FUNCTION_BLOCK VAL_ShiftPoint
VAR_INPUT
    Execute       : BOOL := FALSE;
    CoordSystem   : INT := -1;
    Position      : T_CartesianPos;
    ShiftInFrame  : BOOL := FALSE;
    FrameIdx      : INT := -1;
    Offsets       : T_Trsf := STRUCT(X := 0, Y := 0, Z := 0, RX := 0, RY := 0, RZ := 0);
END_VAR
VAR_OUTPUT
    Busy              : BOOL := FALSE;
    Done              : BOOL := FALSE;
    Error             : BOOL := FALSE;
    ErrorID           : UDINT := 0;
    relativePosition  : T_CartesianPos;
END_VAR
VAR_IN_OUT
    AxesGroup  : T_StaeubliRobot;
END_VAR

VAL_ShiftPoint 2: Inputs

Name

Type

Description

Execute

BOOL

Rising edge triggers function execution

CoordSystem

INT

Index of the user frame (starting with 0)

Position

T_CartesianPos

Absolute end positions for each dimension in the specified coordinate system.

ShiftInFrame

BOOL

True=Position will be shifted in specified user frame. False=shift in according to orientation of the Position parameter

FrameIdx

INT

Index of the user frame in which Position will be shifted - Applicable only if ShiftInFrame is true

Offsets

T_Trsf

Offsets in all directions to apply to the Position

VAL_ShiftPoint 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

relativePosition

T_CartesianPos

New Position after the offets have been applied

VAL_ShiftPoint 4:/VAL_ShiftPoint 5: Inputs/Outputs

Name

Type

Description

AxesGroup

T_StaeubliRobot

Data block for a robot