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

Modules

 ENG_UNIT
 
 BURNOUT_STATUS
 
 TC_TYPE
 

Functions

MODULE_RW_ERR_CODE MX_RTU_Module_TC_Eng_Value_Get (UINT8 slot, UINT8 start, UINT8 count, float *buf, struct Timestamp *time)
 
MODULE_RW_ERR_CODE MX_RTU_Module_TC_Type_Get (UINT8 slot, UINT8 start, UINT8 count, UINT8 *buf)
 
MODULE_RW_ERR_CODE MX_RTU_Module_TC_Unit_Get (UINT8 slot, UINT8 start, UINT8 count, UINT8 *buf)
 
MODULE_RW_ERR_CODE MX_RTU_Module_TC_Min_Eng_Get (UINT8 slot, UINT8 start, UINT8 count, float *buf)
 
MODULE_RW_ERR_CODE MX_RTU_Module_TC_Max_Eng_Get (UINT8 slot, UINT8 start, UINT8 count, float *buf)
 
MODULE_RW_ERR_CODE MX_RTU_Module_TC_Burnout_Status_Get (UINT8 slot, UINT8 start, UINT8 count, UINT8 *buf)
 
MODULE_RW_ERR_CODE MX_RTU_Module_TC_Offset_Get (UINT8 slot, UINT8 start, UINT8 count, float *buf)
 
MODULE_RW_ERR_CODE MX_RTU_Module_TC_Type_Set (UINT8 slot, UINT8 start, UINT8 count, UINT8 *buf)
 
MODULE_RW_ERR_CODE MX_RTU_Module_TC_Unit_Set (UINT8 slot, UINT8 start, UINT8 count, UINT8 *buf)
 
MODULE_RW_ERR_CODE MX_RTU_Module_TC_Min_Eng_Reset (UINT8 slot, UINT32 channel_flags)
 
MODULE_RW_ERR_CODE MX_RTU_Module_TC_Max_Eng_Reset (UINT8 slot, UINT32 channel_flags)
 
MODULE_RW_ERR_CODE MX_RTU_Module_TC_Offset_Set (UINT8 slot, UINT8 start, UINT8 count, float *buf)
 
MODULE_RW_ERR_CODE MX_RTU_Module_TC_Calibration_Set (UINT8 slot, UINT8 start, UINT8 count, float *buf)
 

Detailed Description

Sample Code:
tc.c tc_calibration.c

Function Documentation

MODULE_RW_ERR_CODE MX_RTU_Module_TC_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 TC value for the corresponding channels.
[out]timeTimestamp of TC data.
Returns
MODULE_RW_ERR_CODE
MODULE_RW_ERR_CODE MX_RTU_Module_TC_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_TC_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 TC unit for the corresponding channels.
Returns
MODULE_RW_ERR_CODE
MODULE_RW_ERR_CODE MX_RTU_Module_TC_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 TC value that have occurred for the corresponding channels.
Returns
MODULE_RW_ERR_CODE
MODULE_RW_ERR_CODE MX_RTU_Module_TC_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 TC value that have occurred for the corresponding channels.
Returns
MODULE_RW_ERR_CODE
MODULE_RW_ERR_CODE MX_RTU_Module_TC_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 TC status for the corresponding channels.
Returns
MODULE_RW_ERR_CODE
MODULE_RW_ERR_CODE MX_RTU_Module_TC_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 TC value for the corresponding channels.
MODULE_RW_ERR_CODE MX_RTU_Module_TC_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 TC type for the corresponding channels.
Returns
MODULE_RW_ERR_CODE
MODULE_RW_ERR_CODE MX_RTU_Module_TC_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 TC unit for the corresponding channels.
Returns
MODULE_RW_ERR_CODE
MODULE_RW_ERR_CODE MX_RTU_Module_TC_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 TC 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_TC_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 TC 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_TC_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 TC value for the corresponding channels.
MODULE_RW_ERR_CODE MX_RTU_Module_TC_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 TC 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...