CANopen Slave Documentation
Version 6.16.04
Loading...
Searching...
No Matches
cos406.h File Reference

Detailed Description

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.

+ Include dependency graph for cos406.h:

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)
 

Enumeration Type Documentation

◆ 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.

Enumerator
eWARN_FE 

Frequency exceeded.

eWARN_LCR 

Light control reserve reached.

eWARN_CPU_WS 

CPU watchdog status reset generated.

eWARN_OTLW 

Operating time limit warning.

eWARN_BC 

Battery charge too low.

eWARN_RP 

Reference point not reached.

eWARN_MSW1 

Manufacturer-specific warning 1.

eWARN_MSW2 

Manufacturer-specific warning 2.

eWARN_MSW3 

Manufacturer-specific warning 3.

eWARN_MSW4 

Manufacturer-specific warning 4.

Function Documentation

◆ Cos406_SetEncoderValue()

void Cos406_SetEncoderValue ( uint32_t  ulSgTurnV,
uint32_t  ulMtTurnV,
uint32_t  ulTimeDiffV 
)
Parameters
[in]ulSgTurnVcurrent single turn value
[in]ulMtTurnVcurrent multi turn value
[in]ulTimeDiffVtime 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.