ioPAC RTU Controllers
C/C++ Sample Code Programming Guide
|
Modules | |
DI_MODE | |
DI_TOGGLE | |
Sample Code:
di.c
MODULE_RW_ERR_CODE MX_RTU_Module_DI_Value_Get | ( | UINT8 | slot, |
UINT32 * | value, | ||
struct Timestamp * | time | ||
) |
[in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 9: Expansion IO Ports. |
[out] | value | A bitwise value to indicate all channels' values. The bit 0 represents channel 0's value and so on. |
[out] | time | Timestamp of DI value. |
MODULE_RW_ERR_CODE MX_RTU_Module_DI_Mode_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 DI modes for the corresponding channels. |
MODULE_RW_ERR_CODE MX_RTU_Module_DI_Filter_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 DI filter values for the corresponding channels.
|
MODULE_RW_ERR_CODE MX_RTU_Module_DI_Counter_Start_Get | ( | UINT8 | slot, |
UINT32 * | start | ||
) |
[in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 9: Expansion IO Ports. |
[out] | start | A bitwise value to indicate all channels counters' status. The bit 0's value represents channel 0's counter is started or not and so on (0: stop, 1: start). |
MODULE_RW_ERR_CODE MX_RTU_Module_DI_Counter_Trigger_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 DI counter trigger conditions for the corresponding channels. |
MODULE_RW_ERR_CODE MX_RTU_Module_DI_Counter_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 counter values for the corresponding channels. |
[out] | time | The Timestamp of di counter values. |
MODULE_RW_ERR_CODE MX_RTU_Module_DI_Counter_Overflow_Get | ( | UINT8 | slot, |
UINT32 * | overflow | ||
) |
[in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 9: Expansion IO Ports. |
[out] | overflow | A bitwise value to indicate all channels' overflow status. The bit 0's value represents channel 0's counter is overflowed or not and so on (0: ok, 1: overflow). |
MODULE_RW_ERR_CODE MX_RTU_Module_DI_Mode_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 DI modes for the corresponding channels. |
MODULE_RW_ERR_CODE MX_RTU_Module_DI_Filter_Set | ( | 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 set. |
[in] | count | the number of channels to set. |
[in] | buf | The DI filter values for the corresponding channels.
|
MODULE_RW_ERR_CODE MX_RTU_Module_DI_Counter_Start_Set | ( | UINT8 | slot, |
UINT32 | start | ||
) |
[in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 9: Expansion IO Ports. |
[in] | start | A bitwise value to indicate all channels counters' status. The bit 0's value represents channel 0's counter will start or not and so on (0: stop, 1: start). |
MODULE_RW_ERR_CODE MX_RTU_Module_DI_Counter_Trigger_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 DI counter trigger conditions for the corresponding channels. |
MODULE_RW_ERR_CODE MX_RTU_Module_DI_Counter_Value_Set | ( | 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 set. |
[in] | count | The number of channels to set. |
[in] | buf | The counter values for the corresponding channels. |
MODULE_RW_ERR_CODE MX_RTU_Module_DI_Counter_Overflow_Reset | ( | UINT8 | slot, |
UINT32 | overflow | ||
) |
[in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 9: Expansion IO Ports. |
[in] | overflow | A bitwise value to specify that the channel's overflow flag to be reset. The bit 0's value is 1 represents channel 0's counter overflow flag will be reset and so on. |