ETC_SoE_IDNRead4 (FB)ΒΆ

FUNCTION_BLOCK ETC_SoE_IDNRead4

Function block to read an IDN from an SoE EtherCAT Slave with 4 Bytes

InOut:

Scope

Name

Type

Initial

Comment

Input

xExecute

BOOL

Rising edge: ACTION starts Falling edge: Resets outputs If a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event of an error. In this case, the corresponding output values (xDone, xError) are present at the outputs for exactly one cycle.

xAbort

BOOL

FALSE

TRUE: Action is stopped immediately and all outputs are reset to their initial values.

usiCom

USINT

1

Index of master 1: first ETC master

uiDevice

UINT

The physical slave address to access the EtherCAT slave

usiChannel

USINT

1

not used in the moment because channel is set automatically

wIDN

WORD

The IDN to read

byElem

BYTE

0

2 Name, 3 Attribute, 4 Unit, 5 Minimum, 6 Maximum, 0 or 7 Value

udiTimeOut

UDINT

Timeout for operation in ms

byDrive

BYTE

0

If the device is a multidrive with this input the drive number could be selected

Output

xDone

BOOL

TRUE: Action successfully completed

xBusy

BOOL

TRUE: Function block active

xError

BOOL

TRUE: Error occurred, function block aborts action, FALSE: No error

eError

ETC_SOE_ERROR

If xError is true then this output shows the error reason

udiSercosError

UDINT

Error code as received from the EtherCAT slave

abyData

ARRAY [1..4] OF BYTE

Contains the read data

usiDataLength

USINT

Number of Bytes that could be read