|
ioPAC RTU Controllers
C/C++ Sample Code Programming Guide
|
Functions | |
| IO_ERR_CODE | MX_RTU_RTD_Event_Register (UINT8 slot, UINT8 channel, float value, UINT32 condition, int *handle) |
| IO_ERR_CODE | MX_RTU_RTD_Event_Unregister (int handle) |
| IO_ERR_CODE | MX_RTU_RTD_Event_Get (int handle, float *value, struct Timestamp *time) |
| IO_ERR_CODE | MX_RTU_RTD_Event_Set_Value (int handle, float value, UINT32 condition) |
| IO_ERR_CODE | MX_RTU_RTD_Event_Get_Value (int handle, float *value, UINT32 *condition) |
| IO_ERR_CODE | MX_RTU_RTD_Event_Count (int handle, UINT32 *count) |
| IO_ERR_CODE | MX_RTU_RTD_Event_Clear (int handle) |
| IO_ERR_CODE | MX_RTU_RTD_Event_Reset (void) |
Sample Code:
rtd_event.c
| IO_ERR_CODE MX_RTU_RTD_Event_Register | ( | UINT8 | slot, |
| UINT8 | channel, | ||
| float | value, | ||
| UINT32 | condition, | ||
| int * | handle | ||
| ) |
| [in] | slot | slot 0: Built-in IO, slot 1 ~ 12: IO Module. |
| [in] | channel | channel 0 ~ 23. |
| [in] | value | A RTD value works with the Condition. |
| [in] | condition | Condition should be AI_TC_RTD_EVENT_GREATER , AI_TC_RTD_EVENT_SMALLER , or AI_TC_RTD_EVENT_EQUAL . |
| [out] | handle | A handle, like a file descriptor, stands for the RTD Event. |
| IO_ERR_CODE MX_RTU_RTD_Event_Unregister | ( | int | handle | ) |
| [in] | handle | A handle, like a file descriptor, stands for the RTD Event. |
| IO_ERR_CODE MX_RTU_RTD_Event_Get | ( | int | handle, |
| float * | value, | ||
| struct Timestamp * | time | ||
| ) |
| [in] | handle | A handle, like a file descriptor, stands for the RTD Event. |
| [out] | value | An RTD value when the condition and value are matched. |
| [out] | time | Timestamp of the RTD Event. |
| IO_ERR_CODE MX_RTU_RTD_Event_Set_Value | ( | int | handle, |
| float | value, | ||
| UINT32 | condition | ||
| ) |
| [in] | handle | A handle, like a file descriptor, stands for the RTD Event. |
| [in] | value | An RTD value works with the AI Condition. |
| [in] | condition | Condition should be AI_TC_RTD_EVENT_GREATER , AI_TC_RTD_EVENT_SMALLER , or AI_TC_RTD_EVENT_EQUAL . |
| IO_ERR_CODE MX_RTU_RTD_Event_Get_Value | ( | int | handle, |
| float * | value, | ||
| UINT32 * | condition | ||
| ) |
| [in] | handle | A handle, like a file descriptor, stands for the RTD Event. |
| [out] | value | An RTD value when the condition and value are matched. |
| [out] | condition | Condition can be AI_TC_RTD_EVENT_GREATER , AI_TC_RTD_EVENT_SMALLER , or AI_TC_RTD_EVENT_EQUAL . |
| IO_ERR_CODE MX_RTU_RTD_Event_Count | ( | int | handle, |
| UINT32 * | count | ||
| ) |
| [in] | handle | A handle, like a file descriptor, stands for the RTD Event. |
| [out] | count | The amount of RTD Events in I/O Event Queue. |
| IO_ERR_CODE MX_RTU_RTD_Event_Clear | ( | int | handle | ) |
| [in] | handle | A handle, like a file descriptor, stands for the RTD Event. |
| IO_ERR_CODE MX_RTU_RTD_Event_Reset | ( | void | ) |
1.8.11