ETC_ADS_IoLinkWrite (FB)ΒΆ

FUNCTION_BLOCK ETC_ADS_IoLinkWrite EXTENDS ETC_ADS_IoLink

Function block to write an IO-Link object from a EtherCAT IO-Link gateway

InOut:

Scope

Name

Type

Initial

Comment

Inherited from

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, iError) are present at the outputs for exactly one cycle.

ETrigA

xAbort

BOOL

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

ETrigA

Output

xDone

BOOL

TRUE: Action successfully completed

ETrigA

xBusy

BOOL

TRUE: Function block active

ETrigA

xError

BOOL

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

ETrigA

xAborted

BOOL

TRUE : Action aborted by user

ETrigA

Input

usiCom

USINT

1

Index of master 1: first ETC master

ETC_ADS_IoLink

uiDevice

UINT

The physical slave address to access the EtherCAT slave

ETC_ADS_IoLink

usiChannel

USINT

1

not used in the moment because channel is set automatically

ETC_ADS_IoLink

udiTimeout

UDINT

Timeout for operation in ms

ETC_ADS_IoLink

usiPort

USINT

Port of IO-Link Device

ETC_ADS_IoLink

uiIndex

UINT

Index of the IOLink object

ETC_ADS_IoLink

usiSubIndex

USINT

Subindex of the IOLink object

ETC_ADS_IoLink

udiSize

UDINT

Number of bytes of pbyData

ETC_ADS_IoLink

pbyData

POINTER TO BYTE

Pointer to the data containing the data to be written or pointer to read data

ETC_ADS_IoLink

udiIndexGroup

UDINT

16#F302

Indexgroup of the Io-Link object

ETC_ADS_IoLink

Output

udiResponseError

UDINT

ADS Response Error

ETC_ADS_IoLink

udiDataWritten

UDINT

Number of bytes successfully written