ETC_CO_SdoRead4

Library: IODrvEtherCAT

This function block serves to read EtherCAT slave parameters. Unlike ETC_CO_SdoRead, only parameter that are no longer than 4 bytes are supported. The parameters to be read are specified with Index and Subindex, as used in the object directory.

Inputs

Name

Data type

Description

xExecute

BOOL

Rising edge: Starts the reading of the slave parameters.

In order to release the internal channel again afterwards, the instance must be called at least once with xExecute: = FALSE.

xAbort

BOOL

TRUE: The current read process is aborted

usiCom

USINT

Number of the EtherCAT master: usiCom is always 1 if one EtherCAT master is used. If several masters are used, 1 designates the first, 2 the second and so on.

uiDevice

UInt

Physical address of the slave.

If the auto-configuration mode is deactivated in the master, the slave can be given its own address. This address must be specified here

If the auto-configuration mode is activated, the first slave is given the address 1001. The current address of a slave can always be checked in the slave dialog of the device editor in the EtherCAT Address field.

usiChannel

USINT

Reserved for future extensions

wIndex

WORD

Index of the parameter in the object directory.

bySubindex

BYTE

Subindex of the parameter in the object directory.

udiTimeOut

UDINT

Definition of the watchdog time in milliseconds.

If the reading of the parameters is not yet complete on expiry of this time, an error message is output.

Outputs

Name

Data type

Description

xDone

BOOL

TRUE: Reading of the parameter was completed without error.

xBusy

BOOL

TRUE: Reading is not yet completed.

xError

BOOL

TRUE: An error occurred during reading.

eError

ETC_CO_ERROR

Information about the cause of the error that was displayed by xError, e.g. ETC_CO_TIMEOUT in case of a timeout

udiSdoAbort

UDINT

If an error has occurred in the device, this output provides further information about it

abyData

ARRAY [1..4] OF BYTE

Array of 4 bytes into which the read parameter data are copied

usiDataLength

USINT

Number of bytes read (1,2,4).

ENUM ETC_CO_ERROR

ETC_CO_NO_ERROR

0

No error

ETC_CO_FIRST_ERROR

5750

Error cause is stored at the output udiSdoAbort

ETC_CO_OTHER_ERROR

5751

No master found

ETC_CO_DATA_OVERFLOW

5752

ETC_CO_Expedited and size > 4

ETC_CO_TIME_OUT

5753

Time limits exceeded

ETC_CO_FIRST_MF

5770

not used

ETC_CO_LAST_ERROR

5799

not used

See also: