CANopen Slave Documentation
Version 6.16.04
|
This module implements the variables and callback functions for the object dictionary from CiA 301 for various indices.
Functions | |
void | Cos301_ClearErrorRegister (uint8_t ubErrorValueV) |
void | Cos301_SetDeviceType (uint8_t ubLogicalDeviceV, uint32_t ulDeviceTypeV) |
void | Cos301_SetErrorRegister (uint8_t ubErrorValueV) |
Variables | |
uint8_t | ubIdx1001_ErrorRegisterG |
uint32_t | ulIdx1002_StatusRegisterG |
uint8_t | aubIdx1008_DeviceNameC [] |
uint8_t | aubIdx1009_HwVersionC [] |
uint8_t | aubIdx100A_SwVersionC [] |
uint8_t | ubIdx1018_SubNumberC |
uint32_t | ulIdx1018_VendorIdC |
uint32_t | ulIdx1018_RevisionNumC |
uint8_t | ubIdx1022_EdsTypeC |
void Cos301_ClearErrorRegister | ( | uint8_t | ubErrorValueV | ) |
[in] | ubErrorValueV | bit coded error value |
This function clears the value of object 1001h. The error flag eCoErrReg_GENERIC can only be cleared if no other error is currently active.
void Cos301_SetDeviceType | ( | uint8_t | ubLogicalDeviceV, |
uint32_t | ulDeviceTypeV | ||
) |
[in] | ubLogicalDeviceV | Logical device number |
[in] | ulDeviceTypeV | Device type value |
This function sets the value of object 1000h (Device type). For CANopen FD, the data object provides the number of implemented logical devices, the type of each implemented logical device and the provided functionality. The parameter ubLogicalDeviceV defines the logical device number, the first logical device starts at index 1.
For Classical CANopen, the value of ubLogicalDeviceV must be 1.
void Cos301_SetErrorRegister | ( | uint8_t | ubErrorValueV | ) |
[in] | ubErrorValueV | bit coded error value |
This function sets the value of object 1001h. The generic error flag eCoErrReg_GENERIC is set automatically.
|
extern |
Device name string (Index 1008h)
The string aubIdx1008_DeviceNameC holds the name of the device.
|
extern |
Device hardware version (Index 1009h)
The string ubIdx1009_HwVersionC holds the hardware version of the device.
|
extern |
Device software version (Index 100Ah)
The string aubIdx100A_SwVersionC holds the software version of the device.
|
extern |
Error register (Index 1001h)
The variable ubIdx1001_ErrorRegisterG holds the error status of the device. It must be set by the application program.
|
extern |
Identity object (Index 1018h)
The value ubIdx1018_SubNumberC holds the number of supported sub-indices.
|
extern |
EDS type (Index 1022h)
The value ubIdx1022_EdsTypeC holds the EDS file type, ie. the contents of object 1021h.
|
extern |
Manufacturer status register (Index 1002h)
The variable ulIdx1002_StatusRegisterG holds a manufacturer specific value (32 bit). It must be set by the application program.
|
extern |
Identity object - revision number (Index 1018h)
The value ulIdx1018_RevisionNumC consists of a major revision number and a minor revision number. The major revision number identifies a specific CANopen behavior. If the CANopen functionality is expanded, the major revision has to be incremented. The minor revision number identifies different versions with the same CANopen behavior.
|
extern |
Identity object - vendor ID (Index 1018h)
The value ulIdx1018_VendorIdC holds the CANopen vendor ID. The vendor ID is assigned by the CiA office.