VAL_WriteTool

VAL_WriteTool 1:

FUNCTION_BLOCK VAL_WriteTool

This function block allows to modify the coordinates of a tool located in a database.

Syntax

Definition:

FUNCTION_BLOCK VAL_WriteTool
VAR_INPUT
    Execute       : BOOL := FALSE;
    UserDatabase  : BOOL := FALSE;
    ToolIdx       : INT := -1;
    ToolX         : REAL := 0;
    ToolY         : REAL := 0;
    ToolZ         : REAL := 0;
    ToolRX        : REAL := 0;
    ToolRY        : REAL := 0;
    ToolRZ        : REAL := 0;
    SaveOnDisk    : BOOL := TRUE;
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_WriteTool 2: Inputs

Name

Type

Description

Execute

BOOL

Rising edge triggers function execution

UserDatabase

BOOL

True=Data of the user database will be used

ToolIdx

INT

Index of the tool position in the bank

ToolX

REAL

Value for X coordinate

ToolY

REAL

Value for Y coordinate

ToolZ

REAL

Value for Z coordinate

ToolRX

REAL

Value for RX coordinate

ToolRY

REAL

Value for RY coordinate

ToolRZ

REAL

Value for RZ coordinate

SaveOnDisk

BOOL

True=Tool data stored onto the controller's flashdisk. False=Data not stored--> faster FB execution

VAL_WriteTool 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

VAL_WriteTool 4:/VAL_WriteTool 5: Inputs/Outputs

Name

Type

Description

AxesGroup

T_StaeubliRobot

Data block for a robot