ENUMS ¶ ETC_CO_ERROR (Enum) ETC_CO_MODE (Enum) ETC_SDO_INFO_LIST_TYPE (Enum) ETC_SDO_INFO_OBJECT_CODE (Enum)
ETC_CO_ERROR (ENUM) ¶ TYPE ETC_CO_ERROR : Error code for CoE function blocks InOut: Name Initial Comment ETC_CO_NO_ERROR 0 No error ETC_CO_FIRST_ERROR 1 Error cause is stored at the output udiSdoAbort ETC_CO_OTHER_ERROR ETC_CO_FIRST_ERROR + 16#1 No master found ETC_CO_DATA_OVERFLOW ETC_CO_FIRST_ERROR + 16#2 ETC_CO_Expedited and size > 4 ETC_CO_TIMEOUT ETC_CO_FIRST_ERROR + 16#3 Time limits exceeded ETC_CO_PARAMETER ETC_CO_FIRST_ERROR + 16#4 Wrong parameters ETC_CO_DEVICENOTFOUND ETC_CO_FIRST_ERROR + 16#5 Device not found ETC_CO_FIRST_MF ETC_CO_FIRST_ERROR + 16#20 Not used ETC_CO_LAST_ERROR ETC_CO_FIRST_ERROR + 16#FF
ETC_CO_MODE (ENUM) ¶ TYPE ETC_CO_MODE : InOut: Name Comment ETC_CO_AUTO Mode is automatically chosen ETC_CO_EXPEDITED expedited transfer ETC_CO_SEGMENTED segmented transfer
ETC_SDO_INFO_LIST_TYPE (ENUM) ¶ TYPE ETC_SDO_INFO_LIST_TYPE : Enumeration for SDOInfo function blocks Attributes: qualified_only InOut: Name Initial GetNumberOfObjects 0 AllObjects 1 MappableRxPDO 2 MappableTxPDO 3 ReplacementObjects 4 StartupObjects 5
ETC_SDO_INFO_OBJECT_CODE (ENUM) ¶ TYPE ETC_SDO_INFO_OBJECT_CODE : Enumeration for SDOInfo function blocks Attributes: qualified_only InOut: Name Initial ObjectCode_Variable 7 ObjectCode_ARRAY 8 ObjectCode_Record 9
ETC_CO_SdoRead (FB) ¶ FUNCTION_BLOCK ETC_CO_SdoRead This function block serves to read EtherCAT slave parameters. Unlike ETC_CO_SdoRead4, parameter longer than 4 bytes are also supported. The parameters to be read are specified with Index and Subindex, as used in the object directory. 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 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 ETC_CO_ERROR 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
SdoInfo ¶ ETC_CO_SdoInfoGeEntryDescription (FunctionBlock) ETC_CO_SdoInfoGetODList (FunctionBlock) ETC_CO_SdoInfoGetObjectDescription (FunctionBlock)
ETC_CO_SdoInfoGeEntryDescription (FB) ¶ FUNCTION_BLOCK ETC_CO_SdoInfoGeEntryDescription 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 wIndex WORD The index of the CoE object bySubIndex BYTE The sub index of the CoE object byValueInfo BYTE The value info include which elements shall be in te response Bit 0: reserved Bit 1: reserved Bit 2: reserved Bit 3: unit type Bit 4: default value Bit 5: minimum value Bit 7: maximum value udiTimeOut UDINT Timeout for operation in ms 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 ETC_CO_ERROR If xError is true then eError shows the error reason wDataType WORD Datatype of entry wBitLength WORD Size of entry in bits wObjectAccess WORD access flast of object pData POINTER TO BYTE Pointer to received data szDataLength CAA.SIZE Size of received data in Bytes!
ETC_CO_SdoInfoGetODList (FB) ¶ FUNCTION_BLOCK ETC_CO_SdoInfoGetODList 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 ListType ETC_SDO_INFO_LIST_TYPE Type of data to read udiTimeOut UDINT Timeout for operation in ms pwBuffer POINTER TO WORD Pointer of buffer to read szSize CAA.SIZE 0 Size of buffer to read in words 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 ETC_CO_ERROR If xError is true then eError shows the error reason wNbrObjects WORD Number of objects that could be read
ETC_CO_SdoInfoGetObjectDescription (FB) ¶ FUNCTION_BLOCK ETC_CO_SdoInfoGetObjectDescription 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 wIndex WORD The index of the CoE object udiTimeOut UDINT Timeout for operation in ms 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 ETC_CO_ERROR If xError is true then eError shows the error reason wDataType WORD Datatype of the object byMaxSubIndex BYTE Maximum sub index available byObjectCode ETC_SDO_INFO_OBJECT_CODE Type of object stName STRING Name of Object