CANopen Slave Documentation
Version 6.16.04
|
This module implements the variables and callback functions for the object dictionary from CiA 401 (analog outputs). The module adds the following objects to the object dictionary:
Index | Description | Function / Variable | Configuration Symbol |
---|---|---|---|
6411h | Write analog output 16-bit | Cos401_Idx6411() | COS_DS401_AO |
6443h | Analog output error mode | Cos401_Idx6443() | COS_DS401_AO |
6444h | Analog output error value integer | Cos401_Idx6444() | COS_DS401_AO |
6450h | Analog output SI unit | Cos401_Idx6450() | COS_DS401_AO |
Functions | |
void | Cos401_AO_Error (uint8_t ubEnableV) |
void | Cos401_AO_Set (uint8_t ubChannelV, uint16_t uwValueV) |
void Cos401_AO_Error | ( | uint8_t | ubEnableV | ) |
[in] | ubEnableV | set / reset error condition |
This function sets / resets the analog output module error condition. Passing a 0 to ubEnableV resets the error condition, passing a 1 to ubEnableV sets the error condition. If the error condition is set, the outputs are set according to the objects 6443h and 6444h.
void Cos401_AO_Set | ( | uint8_t | ubChannelV, |
uint16_t | uwValueV | ||
) |
[in] | ubChannelV | output channel number |
[in] | uwValueV | analog output write value |
This function sets the value uwValueV to the analog output. The parameter ubChannelV denotes the channel number. The first channel starts at index 0 (i.e. sub-index - 1 of object 6411h).
This function is called by the protocol stack for access to a specific analog output.
Example