CANopen Slave Documentation
Version 7.00.02
Loading...
Searching...
No Matches
CANopen Device Profile CiA 410

The add-on module CANopen Device Profile CiA 410 allows the integration of an inclinometer as specified in CiA 410.

Module version

The module version is defined by COS_DS410_VERSION_MAJOR and COS_DS410_VERSION_MINOR. Please refer to the history for changes between different versions.

Configuration

The module is configured by setting of the following symbols inside the cos_conf.h file:

COS_DS410

Enable device profile CiA 410 (Inclinometer)

Interface to application

Use the header file cos410.h to get access to the CANopen Device Profile CiA 410 API.

#include "cos410.h"
Object Dictionary for CiA 410 (Inclinometer) .

16-bit slope values

16-bit slope values are read by the application and forwarded to the protocol stack by means of Cos410_SetAngleValue16(). 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:

void CosPdoComSetup(void)
{
// .. other code ..
//------------------------------------------------------------------------------------
// TPDO1 - event-driven PDO, manufacturer specific
//
//------------------------------------------------------------------------------------
// TPDO1 - map object 6010:00h and - as option - object 6020:00h
//
CosPdoTrmMapEnable(0, 0); // disable current mapping for TPDO1
CosPdoTrmMapAdd( 0, 0 ,0x60100010); // add object 6010:00h, length = 16 bit
CosPdoTrmMapAdd( 0, 0 ,0x60200010); // add object 6020:00h, length = 16 bit
CosPdoTrmMapEnable(0, 2); // enable current mapping for TPDO1
// .. other code ..
}
@ ePDO_TYPE_EVENT_MANUFACTURER
Definition cos_pdo.h:187
void CosPdoComSetup(void)
Setup application specific PDO communication parameter.
uint8_t CosPdoTrmMapEnable(uint8_t ubPdoNumberV, uint8_t ubMapNumberV)
uint8_t CosPdoTrmMapAdd(uint8_t ubPdoNumberV, uint8_t ubMapIdxV, uint32_t ulMapEntryV)
CosPdoCom_ts atsTrmPdoComG[]
uint8_t ubTransType
Definition cos_pdo.h:224

32-bit slope values

32-bit slope values are read by the application and forwarded to the protocol stack by means of Cos410_SetAngleValue32(). 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:

void CosPdoComSetup(void)
{
// .. other code ..
//------------------------------------------------------------------------------------
// TPDO2 - sync-driven PDO
//
//------------------------------------------------------------------------------------
// TPDO1 - 6110:00h and - as option - object 6120:00h
//
CosPdoTrmMapEnable(1, 0); // disable current mapping for TPDO2
CosPdoTrmMapAdd( 1, 0 ,0x61100020); // add object 6110:00h, length = 32 bit
CosPdoTrmMapAdd( 1, 0 ,0x61200020); // add object 6120:00h, length = 32 bit
CosPdoTrmMapEnable(1, 2); // enable current mapping for TPDO2
// .. other code ..
}
@ ePDO_TYPE_SYNC_1
Definition cos_pdo.h:160

CANopen Device Profile CiA 410 files

cos410.h

CiA 410 - Inclinometer