ETC_CO_SdoWrite_Access (FB)¶
FUNCTION_BLOCK ETC_CO_SdoWrite_Access
Like ETC_CO_SdoWrite, this function block is for writing EtherCAT slave parameters. However, the complete index with all entries can be written with the help of the additional input xCompleteAccess (BOOL). If xCompleteAccess is set to TRUE, then bySubIndex must be 0. The corresponding data element (channel and priority) can be specified in the CoE mailbox message with the help of a further input, byChannelPriority (BYTE).
- InOut:
Scope
Name
Type
Initial
Comment
Input
xExecuteBOOLRising 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.
xAbortBOOLFALSE
TRUE: Action is stopped immediately and all outputs are reset to their initial values.
usiComUSINT1
Index of master 1: first ETC master
uiDeviceUINTThe physical slave address to access the EtherCAT slave
usiChannelUSINT1
not used in the moment because channel is set automatically
wIndexWORDThe index of the CoE object
bySubindexBYTEThe sub index of the CoE object
udiTimeOutUDINTTimeout for operation in ms
pBufferCAA.PVOIDPointer to the buffer for writing the data
szSizeCAA.SIZENumber of bytes to be written
eModeMode for transmission
xCompleteAccessBOOLFALSE
Object should be written with complete access (all subobjects)
byChannelPriorityBYTEThe special channel priority in the mailbox message could be set with this input
Output
xDoneBOOLTRUE: Action successfully completed
xBusyBOOLTRUE: Function block active
xErrorBOOLTRUE: Error occurred, function block aborts action, FALSE: No error
eErrorIf xError is true then eError shows the error reason
udiSdoAbortUDINTThe abort code as received from the slave device
szDataWrittenCAA.SIZENumber of byte successfully written