ETC_CO_SdoRead_Channel (FB)ΒΆ
FUNCTION_BLOCK ETC_CO_SdoRead_Channel
Like ETC_CO_SdoRead_Access, this function block is for reading all EtherCAT slave parameters.
There is an additional input, byChannelPriority (BYTE), with which the channel and priority can be specified in the CoE mailbox message. The first 6 bits specify the channel, the final 2 bits the priority.
- InOut:
Scope
Name
Type
Initial
Comment
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) are present at the outputs for exactly one cycle.
xAbort
BOOL
FALSE
TRUE: Action is stopped immediately and all outputs are reset to their initial values.
usiCom
USINT
1
Index of master 1: first ETC master
uiDevice
UINT
The physical slave address to access the EtherCAT slave
usiChannel
USINT
1
not used in the moment because channel is set automatically
wIndex
WORD
The index of the CoE object
bySubindex
BYTE
The sub index of the CoE object
udiTimeOut
UDINT
Timeout for operation in ms
pBuffer
CAA.PVOID
0
Pointer to the buffer for reading the data
szSize
CAA.SIZE
0
Size of buffer to store the data
xCompleteAccess
BOOL
FALSE
Object should be read with complete access (all subobjects)
byChannelPriority
BYTE
0
The special channel priority in the mailbox message could be set with this input
Output
xDone
BOOL
TRUE: Action successfully completed
xBusy
BOOL
TRUE: Function block active
xError
BOOL
TRUE: Error occurred, function block aborts action, FALSE: No error
eError
If xError is true then eError shows the error reason
udiSdoAbort
UDINT
The abort code as received from the slave device
szDataRead
CAA.SIZE
Number of bytes successfully read