FB_TransferData

FB_TransferData 1:

FUNCTION_BLOCK FB_TransferData

This function block manages the communication with uniVAL plc server installed on the robot side

Syntax

Definition:

FUNCTION_BLOCK FB_TransferData
VAR_INPUT
    Execute       : BOOL := FALSE;
    ServerID      : UINT := 0;
    FunctionCode  : UINT := 0;
    iBitParam     : ARRAY [0..GV.uiBITPARAM_MAX_OUT] OF BOOL;
    iWordParam    : ARRAY [0..GV.uiWORDPARAM_MAX_OUT] OF INT;
    iFloatParam   : ARRAY [0..GV.uiFLOATPARAM_MAX_OUT] OF REAL;
END_VAR
VAR_OUTPUT
    Busy         : BOOL := FALSE;
    Done         : BOOL := FALSE;
    Error        : BOOL := FALSE;
    ErrorID      : UDINT := 0;
    oBitParam    : ARRAY [0..GV.uiBITPARAM_MAX_IN] OF BOOL;
    oWordParam   : ARRAY [0..GV.uiWORDPARAM_MAX_IN] OF INT;
    oFloatParam  : ARRAY [0..GV.uiFLOATPARAM_MAX_IN] OF REAL;
END_VAR
VAR_IN_OUT
    AxesGroup  : T_StaeubliRobot;
END_VAR

FB_TransferData 2: Inputs

Name

Type

Description

Execute

BOOL

Rising edge starts function execution

ServerID

UINT

Number of the server to address

FunctionCode

UINT

Code of the function to address

iBitParam

ARRAY [0..GV.uiBITPARAM_MAX_OUT] OF BOOL

iWordParam

ARRAY [0..GV.uiWORDPARAM_MAX_OUT] OF INT

iFloatParam

ARRAY [0..GV.uiFLOATPARAM_MAX_OUT] OF REAL

FB_TransferData 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

oBitParam

ARRAY [0..GV.uiBITPARAM_MAX_IN] OF BOOL

oWordParam

ARRAY [0..GV.uiWORDPARAM_MAX_IN] OF INT

oFloatParam

ARRAY [0..GV.uiFLOATPARAM_MAX_IN] OF REAL

FB_TransferData 4:/FB_TransferData 5: Inputs/Outputs

Name

Type

Description

AxesGroup

T_StaeubliRobot

Data block for a robot