![]() |
CANopen Slave Protocol Stack
Version 7.08.00
|
Include this header to access the complete CiA 404 API. It conditionally includes the sub-module headers for each function block based on the cos_conf.h configuration:
| Function block | Header | Enabling define |
|---|---|---|
| Analog input | cos404ai.h | COS_DS404_AI |
| Analog output | cos404ao.h | COS_DS404_AO |
| Controller | cos404co.h | COS_DS404_CO |
| Digital input | cos404di.h | COS_DS404_DI |
| Digital output | cos404do.h | COS_DS404_DO |
Set each define to the number of channels (or groups) required, or to 0 to exclude that function block from the build. See CANopen Device Profile CiA 404 for integration details.
Macros | |
| #define | COS_DS404_VERSION_MAJOR 2 |
| #define | COS_DS404_VERSION_MINOR 10 |
Functions | |
| uint16_t | Cos404_GetActiveDataType (void) |
| uint8_t | Cos404_SetActiveDataType (uint16_t uwDataTypeV) |
| enum Cos404_Channel_e |
This enumeration provides channel values used in conjunction with CiA 404. Note that the maximum channel value is defined by one of the following definitions in the file cos_conf.h
COS_DS404_AI : if the analog input function block is supportedCOS_DS404_AO : if the analog output function block is supported | uint16_t Cos404_GetActiveDataType | ( | void | ) |
Get the active data type for CiA 404 process and field values.
CoDT_e: eCO_DT_INTEGER16 (3) — data type int16_teCO_DT_INTEGER32 (4) — data type int32_teCO_DT_REAL32 (8) — data type floatReturns the active data type of the CiA 404 module. Only the three types listed above are supported; the active type is set via Cos404_SetActiveDataType() and controls which object indices are used for AI/AO process and field values (e.g. 7130h for int16_t, 9130h for int32_t, or 6130h for float).
| uint8_t Cos404_SetActiveDataType | ( | uint16_t | uwDataTypeV | ) |
Set the active data type for CiA 404 process and field values.
| [in] | uwDataTypeV | Value from CoDT_e that corresponds to data type |
eCosSdo_WRITE_OK on success or any other value from CosSdo_e in case of an errorThis function is used to setup the active data type of the CiA 404 profile. The supported values are:
This parameter has impact on data elements for process and field values of CiA 404 AI and AO.