5 l_etc_coe_sdowrite (fb), L_etc_coe_sdowrite (fb), L_etc_coe_sdowrite (fb) ( 131) – Lenze EtherCAT Controller-based Automation User Manual

Page 131: 9function library l_iodrvethercat.lib

Advertising
background image

Lenze · Controller-based Automation · EtherCAT® Communication Manual · DMS 6.4 EN · 04/2014 · TD17

131

9

Function library L_IODrvEtherCAT.lib

9.2

CoE Interface

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

9.2.5

L_ETC_CoE_SdoWrite (FB)

This function block triggers downloading of a CoE object (SDO) to the slave or to the master.
Visualisation: VISU_L_ETC_CoE_SdoWrite

Inputs (VAR_INPUT)

Note!

For executing the function block, the EtherCAT master and the slave must be at least in

the "Pre-Operational" state.

L_ETC_CoE_SdoWrite

BOOL  xExecute

xDone  BOOL

BOOL  xAbort

xBusy  BOOL

USINT  usiCom

xError  BOOL

UINT  uiDevice

eErrorCode  L_ETC_ERRORCODE

WORD  wIndex

udiSdoAbort  UDINT

BYTE  bySubindex

UDINT  udiTimeOut

CAA_PVOID  pBuffer

CAA_SIZE  szSize

Identifier/data type

Meaning/possible settings

xExecute

BOOL

A positive edge (TRUE) triggers a write request (downloading) of a CoE object.

xAbort

BOOL

A positive edge (TRUE) aborts a running write request (download).

xAbort is currently not supported in the Lenze control technology R3.x.

usiCom

USINT

EtherCAT master instance number

• In the Lenze control technology R3.x, only instance number 1 is currently

supported. usiCom has been pre-assigned with 1, so that the input can be left

open.

• A value that does not equal 1 causes the error ETC_E_INVALIDPARM

(0x9811000B).

uiDevice

UINT

EtherCAT address of the master/slave.

• The address 0 directly accesses the object directory of the EtherCAT master.

wIndex

WORD

CANopen index to be read in the object directory of the master or slave.

• Formula for converting a Lenze code number into a CANopen index: Index =

0x5FFF - code number

bySubindex

BYTE

Subindex in the object directory of the master or slave.

udiTimeout

UDINT

Timeout in milliseconds (ms)

• The value 0 is not permissible and causes the error ETC_E_INVALIDPARM

(0x9811000B).

pBuffer

CAA_PVOID

Reference to the memory buffer from which the values to be written are to be taken.

szSize

CAA_SIZE

Number of the bytes to be written

Advertising