![]() |
CANopen Slave Protocol Stack
Version 7.08.00
|
The add-on module CANopen Device Profile CiA 402 allows the integration of drives and motion control as specified in CiA 402-1.
The module version is defined by COS_DS402_VERSION_MAJOR and COS_DS402_VERSION_MINOR. Please refer to the history for changes between different versions.
The module is enabled by setting COS_DS402 > 0 inside the cos_conf.h file:
| Define | Description |
| COS_DS402 | enable CiA 402 device profile; set to 1 to include the profile |
Use the header file cos402.h to get access to the CANopen Device Profile CiA 402 API.
The PDS FSA controlword, statusword, option codes, modes of operation, and profile position objects are accessed through the Cos402_Common_ts structure.
The application reads the current values by calling Cos402_GetCommon() and updates them by calling Cos402_SetCommon():
Velocity mode (vl mode) parameters are accessed through the Cos402_Velocity_ts structure.
The application reads the current target velocity and updates the actual velocity by calling Cos402_GetVelocity() and Cos402_SetVelocity():
If dynamic PDO mapping is supported (COS_PDO_MAPPING > 0), the default mapping per CiA 402-3 section 6.3 (frequency converter device) can be set inside the CosPdoComSetup() function:
| File | Description |
| cos402.h | CiA 402 - API, structures, and public function prototypes |
| cos402.c | CiA 402 - Object dictionary handler functions and PDO handlers |
| cos402.inc | CiA 402 - Object dictionary entries (included by cos_dict.c) |
| cos402_rpdo.inc | CiA 402 - Receive PDO mapping entries (included by cos_pdod.c) |
| cos402_tpdo.inc | CiA 402 - Transmit PDO mapping entries (included by cos_pdod.c) |