CANopen Slave Documentation
Version 6.16.04
|
The purpose of encoders is to detect positions of any kind of machine tools. Encoders detect positions and transmit the position values across the CANopen network. Optionally the encoder may provide speed, acceleration, and jerk values. The encoder may receive configuration information via SDO, e.g. conversion parameters for calculating an - to the application adapted - position value. In the NMT state operational, the position value may be transmitted by synchronous PDO. Additionally, the encoders may transmit asynchronously a PDO scheduled by the elapsing of the event timer.
The CANopen device profile defines two encoder classes, a standard device class 1 (C1) and an extended device class 2 (C2). The standard device C1 specifies basic functionality, which shall be provided by each device. The C2 extended device provides a variety of features with mandatory and optional functions. The mandatory functions of both, C1 and C2, are necessary to ensure non-manufacturer specific operations of a device.
By defining mandatory device characteristics in C1, basic network and encoder operation is guaranteed. By defining extended C2, a degree of defined flexibility may be built in. By leaving hooks for optional and manufacturer-specific functionality, the device developer will not be constrained to an out-of-date standard.
Macros | |
#define | DS406_PROFILE_VERSION 0x0302 |
#define | DS406_SUPPORTED_ALARMS 0x0001 |
#define | DS406_SUPPORTED_WARNINGS 0x0002 |
#define | DS406_RESOLUTION_SINGLE_TURN 16384 |
#define | COS_DS406_VERSION_MAJOR 3 |
#define | COS_DS406_VERSION_MINOR 02 |
Enumerations | |
enum | DS406_WARN_e |
Functions | |
void | Cos406_SetEncoderValue (uint32_t ulSgTurnV, uint32_t ulMtTurnV, uint32_t ulTimeDiffV) |
enum DS406_WARN_e |
Warnings.
Warnings indicate that tolerance for certain internal parameters of the encoder have been exceeded. This warning will be used for Object 6505.
void Cos406_SetEncoderValue | ( | uint32_t | ulSgTurnV, |
uint32_t | ulMtTurnV, | ||
uint32_t | ulTimeDiffV | ||
) |
[in] | ulSgTurnV | current single turn value |
[in] | ulMtTurnV | current multi turn value |
[in] | ulTimeDiffV | time difference between current values and last values |
This function passes the encoder values to the device profile CiA 406. The value for time difference is given in multiples of 1 ns.