9function library l_iodrvethercat.lib – Lenze EtherCAT Controller-based Automation User Manual
Page 136
9
Function library L_IODrvEtherCAT.lib
9.2
CoE Interface
136
Lenze · Controller-based Automation · EtherCAT® Communication Manual · DMS 6.4 EN · 04/2014 · TD17
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Inputs (VAR_INPUT)
Outputs (VAR_OUTPUT)
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.
dwFlags
DWORD
dwFlags controls the function block behaviour:
• 16#00000000: Function block behaviour
L_ETC_CoE_SdoWrite (FB) ( 131)
• 16#00000001: "Complete access"
Type definition see
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
Identifier/data type
Meaning/possible settings
xDone
BOOL
• TRUE: An action has been executed successfully.
• FALSE: No action active / action is still being executed.
xBusy
BOOL
• TRUE: An action is currently being executed.
• FALSE: No action active
xError
BOOL
• TRUE: An error has occurred.
• FALSE: No error
eErrorCode
L_ETC_ERRORCODE
Error code of the incorrectly executed action (xError = TRUE).
General error codes (L_ETC_ERRORCODE) ( 183)
udiSdoAbort
UDINT
If a write request (download) to the slave or master is rejected with an error, here the
CANopen abort code is returned.