CANopen Slave Documentation
Version 6.16.04
Loading...
Searching...
No Matches
Cos404_AI_Config_s Struct Reference

Detailed Description

This struct holds parameters that are used at initial startup of the CiA 404 AI software module. The values within this structure are provided to CiA 404 AI software module using the Cos404_AI_Init() function and are used within Cos404_AI_ParmInit() for software initialization.

+ Collaboration diagram for Cos404_AI_Config_s:

Data Fields

uint16_t uwObj6110_SensorType
 
uint8_t ubObj6112_OpMode
 
Cos404AiHandler_fn pfnSensorTypeHandler
 
Cos404AiEvent_fn pfnOperatingModeEvent
 
Cos404AiEvent_fn pfnFilterChangeEvent
 

Field Documentation

◆ pfnFilterChangeEvent

Cos404AiEvent_fn Cos404_AI_Config_s::pfnFilterChangeEvent
Parameters
[in]ubChannelVAnalog input channel

The parameter ubChannelV defines the channel number, the first channel starts at eCOS404_CHANNEL_1.

This event handler is called by the 404 AI software module upon change of filter parameters. The application can check the current operating mode by calling Cos404_AI_GetFilterParam().

Note
In case this function is registered, it is called during initialization and upon write access to the objects at index 61A0h and 61A1h.

◆ pfnOperatingModeEvent

Cos404AiEvent_fn Cos404_AI_Config_s::pfnOperatingModeEvent
Parameters
[in]ubChannelVAnalog input channel

The parameter ubChannelV defines the channel number, the first channel starts at eCOS404_CHANNEL_1.

This event handler is called by the 404 AI software module upon change of operating mode. The application can check the current operating mode by calling Cos404_AI_GetOperatingMode().

Note
In case this function is registered, it is called during initialization and upon write access to the object at index 6112h.

◆ pfnSensorTypeHandler

Cos404AiHandler_fn Cos404_AI_Config_s::pfnSensorTypeHandler
Parameters
[in]ubChannelVAnalog input channel
[in]pvdDataVPointer to sensor type value defined by Cos404_AI_SensorType_e
Returns
eCosSdo_WRITE_OK on success or any other value from CosSdo_e in case of an error

The parameter ubChannelV defines the channel number, the first channel starts at eCOS404_CHANNEL_1. The data contents of pointer pvdDataV should be defined by the Cos404_AI_SensorType_e enumeration. It is the task of the application to check the value and evaluate whether the corresponding sensor type is supported or not. In case the sensor type is accepted by the application the function shall return eCosSdo_WRITE_OK.

Note
In case this function is registered, it is called during initialization and upon write access to the object at index 6110h.

◆ ubObj6112_OpMode

uint8_t Cos404_AI_Config_s::ubObj6112_OpMode

This variable defines the operating mode of the AI channel. The default operating mode is provided once initially by the application during configuration (refer to Cos404_AI_Init()) and can be later set via SDO / USDO write access to the object at index 6112h.

◆ uwObj6110_SensorType

uint16_t Cos404_AI_Config_s::uwObj6110_SensorType

This variable defines the sensor type of the analog input channel. The default sensor type is provided once initially by the application within configuration at call of Cos404_AI_Init() and can be later set via the object at index 6110h.

The object at index 6110h is only writeable if a function handler has been provided for the element pfnSensorTypeHandler .