CANopen Slave Documentation
Version 6.16.04
|
The add-on module CANopen Device Profile CiA 401 allows the integration of generic I/O modules as specified in CiA 401-1.
The module version is defined by COS_DS401_VERSION_MAJOR and COS_DS401_VERSION_MINOR. Please refer to the history for changes between different versions.
The module is configured by setting of the following symbols inside the cos_conf.h
file:
COS_DS401_DI | number of digital input blocks, one block has 8 individual digital inputs |
COS_DS401_DO | number of digital output blocks, one block has 8 individual digital outputs |
COS_DS401_AI | number of analog inputs |
COS_DS401_AO | number of analog outputs |
Use the header file cos401.h
to get access to the CANopen Device Profile CiA 401 API.
Digital inputs are read by the application and passed to the protocol stack by means of Cos401_DI_Set(). If dynamic PDO mapping is supported (COS_PDO_MAPPING > 0) the default mapping can be set inside the CosPdoComSetup() function, as shown in the following example:
Digital outputs are set by the protocol stack by means of Cos401_DO_Set(). If dynamic PDO mapping is supported (COS_PDO_MAPPING > 0) the default mapping can be set inside the CosPdoComSetup() function, as shown in the following example:
Analog inputs are read by the application and passed to the protocol stack by means of Cos401_AI_SetProcessValue16(). If dynamic PDO mapping is supported (COS_PDO_MAPPING > 0) the default mapping can be set inside the CosPdoComSetup() function, as shown in the following example:
Analog outputs are set by the protocol stack by means of Cos401_AO_Set(). If dynamic PDO mapping is supported (COS_PDO_MAPPING > 0) the default mapping can be set inside the CosPdoComSetup() function, as shown in the following example:
cos401di.h | CiA 401 - Digital inputs |
cos401do.h | CiA 401 - Digital outputs |
cos401ai.h | CiA 401 - Analog inputs |
cos401ao.h | CiA 401 - Analog outputs |