ioPAC RTU Controllers
C/C++ Sample Code Programming Guide
Modules | Functions
RTD

Modules

 RTD_TYPE
 

Functions

MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Eng_Value_Get (UINT8 slot, UINT8 start, UINT8 count, float *buf, struct Timestamp *time)
 
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Type_Get (UINT8 slot, UINT8 start, UINT8 count, UINT8 *buf)
 
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Unit_Get (UINT8 slot, UINT8 start, UINT8 count, UINT8 *buf)
 
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Min_Eng_Get (UINT8 slot, UINT8 start, UINT8 count, float *buf)
 
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Max_Eng_Get (UINT8 slot, UINT8 start, UINT8 count, float *buf)
 
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Burnout_Status_Get (UINT8 slot, UINT8 start, UINT8 count, UINT8 *buf)
 
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Offset_Get (UINT8 slot, UINT8 start, UINT8 count, float *buf)
 
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Type_Set (UINT8 slot, UINT8 start, UINT8 count, UINT8 *buf)
 
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Unit_Set (UINT8 slot, UINT8 start, UINT8 count, UINT8 *buf)
 
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Min_Eng_Reset (UINT8 slot, UINT32 channel_flags)
 
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Max_Eng_Reset (UINT8 slot, UINT32 channel_flags)
 
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Offset_Set (UINT8 slot, UINT8 start, UINT8 count, float *buf)
 
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Calibration_Set (UINT8 slot, UINT8 start, UINT8 count, float *buf)
 

Detailed Description

Sample Code:
rtd.c

Function Documentation

MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Eng_Value_Get ( UINT8  slot,
UINT8  start,
UINT8  count,
float *  buf,
struct Timestamp time 
)
Parameters
[in]slotslot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
[in]startThe first channel to get.
[in]countThe number of channels to get.
[out]bufThe RTD value for the corresponding channels.
[out]timeTimestamp of RTD data.
Returns
MODULE_RW_ERR_CODE
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Type_Get ( UINT8  slot,
UINT8  start,
UINT8  count,
UINT8 buf 
)
Parameters
[in]slotslot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
[in]startThe first channel to get.
[in]countThe number of channels to get.
[out]bufThe TC type for the corresponding channels.
Returns
MODULE_RW_ERR_CODE
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Unit_Get ( UINT8  slot,
UINT8  start,
UINT8  count,
UINT8 buf 
)
Parameters
[in]slotslot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
[in]startThe first channel to get.
[in]countThe number of channels to get.
[out]bufThe RTD unit for the corresponding channels.
Returns
MODULE_RW_ERR_CODE
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Min_Eng_Get ( UINT8  slot,
UINT8  start,
UINT8  count,
float *  buf 
)
Parameters
[in]slotslot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
[in]startThe first channel to get.
[in]countThe number of channels to get.
[out]bufThe minimal RTD value that have occurred for the corresponding channels.
Returns
MODULE_RW_ERR_CODE
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Max_Eng_Get ( UINT8  slot,
UINT8  start,
UINT8  count,
float *  buf 
)
Parameters
[in]slotslot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
[in]startThe first channel to get.
[in]countThe number of channels to get.
[out]bufThe maximal RTD value that have occurred for the corresponding channels.
Returns
MODULE_RW_ERR_CODE
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Burnout_Status_Get ( UINT8  slot,
UINT8  start,
UINT8  count,
UINT8 buf 
)
Parameters
[in]slotslot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
[in]startThe first channel to get.
[in]countThe number of channels to get.
[out]bufThe RTD status for the corresponding channels.
Returns
MODULE_RW_ERR_CODE
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Offset_Get ( UINT8  slot,
UINT8  start,
UINT8  count,
float *  buf 
)
Parameters
[in]slotslot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
[in]startThe first channel to get.
[in]countThe number of channels to get.
[out]bufThe user-defined offset for the corresponding channels.
Returns
MODULE_RW_ERR_CODE
Note
These offsets are volatile. This value will be the extra offset of the RTD value for the corresponding channels.
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Type_Set ( UINT8  slot,
UINT8  start,
UINT8  count,
UINT8 buf 
)
Parameters
[in]slotslot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
[in]startThe first channel to set.
[in]countThe number of channels to set.
[in]bufThe RTD type for the corresponding channels.
Returns
MODULE_RW_ERR_CODE
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Unit_Set ( UINT8  slot,
UINT8  start,
UINT8  count,
UINT8 buf 
)
Parameters
[in]slotslot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
[in]startThe first channel to set.
[in]countThe number of channels to set.
[in]bufThe RTD unit for the corresponding channels.
Returns
MODULE_RW_ERR_CODE
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Min_Eng_Reset ( UINT8  slot,
UINT32  channel_flags 
)
Parameters
[in]slotslot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
[in]channel_flagsReset the minimal RTD value that have occurred for the specified channel. The bit 0 represents channel 0 will be reset and so on.
Returns
MODULE_RW_ERR_CODE
Note
This API only reset the minimal value, reset is setting the value to be current value.
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Max_Eng_Reset ( UINT8  slot,
UINT32  channel_flags 
)
Parameters
[in]slotslot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
[in]channel_flagsReset the maximal RTD value that have occurred for the specified channel. The bit 0 represents channel 0 will be reset and so on.
Returns
MODULE_RW_ERR_CODE
Note
This API only reset the maximal value, reset is setting the value to be current value.
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Offset_Set ( UINT8  slot,
UINT8  start,
UINT8  count,
float *  buf 
)
Parameters
[in]slotslot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
[in]startThe first channel to set.
[in]countThe number of channels to set.
[in]bufThe user-defined offset for the corresponding channels.
Returns
MODULE_RW_ERR_CODE
Note
These offsets are volatile. This value will be the extra offset of the RTD value for the corresponding channels.
MODULE_RW_ERR_CODE MX_RTU_Module_RTD_Calibration_Set ( UINT8  slot,
UINT8  start,
UINT8  count,
float *  buf 
)
Parameters
[in]slotslot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
[in]startThe first channel to set.
[in]countThe number of channels to set.
[in]bufThe current temperatures for the corresponding channels.
Returns
MODULE_RW_ERR_CODE
Note
After executing this API, the non-volatile offsets will be set for the corresponding channels. This value will be the calibration offset of the RTD value for the corresponding channels.
Calibration suggestion: (follow the following steps to calibrate the TC module)
  1. Ensure the sensor is connected.
  2. Ensure the channel and its sensor type is correctly selected.
  3. Put the sensor into a glass that contains a mixture of ice and water.
  4. Excute this API with zero degrees Celsius as input parameter
  5. Do not remove the sensor from the ice water during calibration...