ioPAC RTU Controllers
C/C++ Sample Code Programming Guide
|
Modules | |
AI_RANGE | |
AI_STATUS | |
Sample Code:
ai.c
AI_TRANSFORM_ERR_CODE MX_RTU_AI_Raw_to_Eng | ( | UINT32 | range, |
int | raw_value, | ||
float * | eng_value | ||
) |
[in] | range | AI range |
[in] | raw_value | The raw value to transform. |
[out] | eng_value | The engineering value transformed form the input raw_value. |
AI_TRANSFORM_ERR_CODE MX_RTU_AI_Eng_to_Raw | ( | UINT32 | range, |
float | eng_value, | ||
int * | raw_value | ||
) |
[in] | range | AI range |
[in] | eng_value | The engineering value to transform. |
[out] | raw_value | The raw value transformed form the input eng_value. |
MODULE_RW_ERR_CODE MX_RTU_Module_AI_Raw_Value_Get | ( | UINT8 | slot, |
UINT8 | start, | ||
UINT8 | count, | ||
UINT32 * | buf, | ||
struct Timestamp * | time | ||
) |
[in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 9: Expansion IO Ports. |
[in] | start | The first channel to get. |
[in] | count | The number of channels to get. |
[out] | buf | The AI raw data for the corresponding channels. |
[out] | time | Timestamp of AI data. |
MODULE_RW_ERR_CODE MX_RTU_Module_AI_Eng_Value_Get | ( | UINT8 | slot, |
UINT8 | start, | ||
UINT8 | count, | ||
float * | buf, | ||
struct Timestamp * | time | ||
) |
[in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 9: Expansion IO Ports. |
[in] | start | The first channel to get. |
[in] | count | The number of channels to get. |
[out] | buf | The AI engineering data for the corresponding channels. |
[out] | time | Timestamp of AI data. |
MODULE_RW_ERR_CODE MX_RTU_Module_AI_Range_Get | ( | UINT8 | slot, |
UINT8 | start, | ||
UINT8 | count, | ||
UINT8 * | buf | ||
) |
[in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 9: Expansion IO Ports. |
[in] | start | The first channel to get. |
[in] | count | The number of channels to get. |
[out] | buf | The AI range for the corresponding channels. |
MODULE_RW_ERR_CODE MX_RTU_Module_AI_Min_Raw_Get | ( | UINT8 | slot, |
UINT8 | start, | ||
UINT8 | count, | ||
UINT32 * | buf | ||
) |
[in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 9: Expansion IO Ports. |
[in] | start | The first channel to get. |
[in] | count | The number of channels to get. |
[out] | buf | The minimal AI raw data that have occurred for the corresponding channels. |
MODULE_RW_ERR_CODE MX_RTU_Module_AI_Max_Raw_Get | ( | UINT8 | slot, |
UINT8 | start, | ||
UINT8 | count, | ||
UINT32 * | buf | ||
) |
[in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 9: Expansion IO Ports. |
[in] | start | The first channel to get. |
[in] | count | The number of channels to get. |
[out] | buf | The maximal AI raw data that have occurred for the corresponding channels. |
MODULE_RW_ERR_CODE MX_RTU_Module_AI_Min_Eng_Get | ( | UINT8 | slot, |
UINT8 | start, | ||
UINT8 | count, | ||
float * | buf | ||
) |
[in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 9: Expansion IO Ports. |
[in] | start | The first channel to get. |
[in] | count | The number of channels to get. |
[out] | buf | The minimal AI engeering data that have occurred for the corresponding channels. |
MODULE_RW_ERR_CODE MX_RTU_Module_AI_Max_Eng_Get | ( | UINT8 | slot, |
UINT8 | start, | ||
UINT8 | count, | ||
float * | buf | ||
) |
[in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 9: Expansion IO Ports. |
[in] | start | The first channel to get. |
[in] | count | The number of channels to get. |
[out] | buf | The maximal AI engeering data that have occurred for the corresponding channels. |
MODULE_RW_ERR_CODE MX_RTU_Module_AI_Burnout_Value_Get | ( | UINT8 | slot, |
UINT8 | start, | ||
UINT8 | count, | ||
float * | buf | ||
) |
[in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 9: Expansion IO Ports. |
[in] | start | The first channel to get. |
[in] | count | The number of channels to get. |
[out] | buf | The burnout value for the corresponding channels. |
MODULE_RW_ERR_CODE MX_RTU_Module_AI_Status_Get | ( | UINT8 | slot, |
UINT8 | start, | ||
UINT8 | count, | ||
UINT8 * | buf | ||
) |
[in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 9: Expansion IO Ports. |
[in] | start | The first channel to get. |
[in] | count | The number of channels to get. |
[out] | buf | The AI status for the corresponding channels. |
MODULE_RW_ERR_CODE MX_RTU_Module_AI_Range_Set | ( | UINT8 | slot, |
UINT8 | start, | ||
UINT8 | count, | ||
UINT8 * | buf | ||
) |
[in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 9: Expansion IO Ports. |
[in] | start | The first channel to set. |
[in] | count | The number of channels to set. |
[in] | buf | The AI range for the corresponding channels. |
MODULE_RW_ERR_CODE MX_RTU_Module_AI_Min_Raw_Reset | ( | UINT8 | slot, |
UINT32 | channel | ||
) |
[in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 9: Expansion IO Ports. |
[in] | channel | Reset the minimal AI raw data that have occurred for the specified channel. The bit 0 represents channel 0 will be reset and so on. |
MODULE_RW_ERR_CODE MX_RTU_Module_AI_Max_Raw_Reset | ( | UINT8 | slot, |
UINT32 | channel | ||
) |
[in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 9: Expansion IO Ports. |
[in] | channel | Reset the maximal AI raw data that have occurred for the specified channel. The bit 0 represents channel 0 will be reset and so on. |
MODULE_RW_ERR_CODE MX_RTU_Module_AI_Min_Eng_Reset | ( | UINT8 | slot, |
UINT32 | channel | ||
) |
[in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 9: Expansion IO Ports. |
[in] | channel | Reset the minimal AI engeering data that have occurred for the specified channel. The bit 0 represents channel 0 will be reset and so on. |
MODULE_RW_ERR_CODE MX_RTU_Module_AI_Max_Eng_Reset | ( | UINT8 | slot, |
UINT32 | channel | ||
) |
[in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 9: Expansion IO Ports. |
[in] | channel | Reset the maximal AI engeering data that have occurred for the specified channel. The bit 0 represents channel 0 will be reset and so on. |
MODULE_RW_ERR_CODE MX_RTU_Module_AI_Burnout_Value_Set | ( | UINT8 | slot, |
UINT8 | start, | ||
UINT8 | count, | ||
float * | buf | ||
) |
[in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 9: Expansion IO Ports. |
[in] | start | The first channel to set. |
[in] | count | The number of channels to set. |
[in] | buf | The burnout value for the corresponding channels. |