| ioPAC RTU Controllers C/C++ Sample Code Programming Guide

- Main Page
- Modules
- Data Structures
- Files

Modules | Functions
RTD
Library » IO

## 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] | slot | slot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
  [in] | start | The first channel to get.
  [in] | count | The number of channels to get.
  [out] | buf | The RTD value for the corresponding channels.
  [out] | time | Timestamp 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] | slot | slot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
  [in] | start | The first channel to get.
  [in] | count | The number of channels to get.
  [out] | buf | The 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] | slot | slot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
  [in] | start | The first channel to get.
  [in] | count | The number of channels to get.
  [out] | buf | The 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] | slot | slot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
  [in] | start | The first channel to get.
  [in] | count | The number of channels to get.
  [out] | buf | The 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] | slot | slot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
  [in] | start | The first channel to get.
  [in] | count | The number of channels to get.
  [out] | buf | The 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] | slot | slot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
  [in] | start | The first channel to get.
  [in] | count | The number of channels to get.
  [out] | buf | The 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] | slot | slot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
  [in] | start | The first channel to get.
  [in] | count | The number of channels to get.
  [out] | buf | The 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] | slot | slot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
  [in] | start | The first channel to set.
  [in] | count | The number of channels to set.
  [in] | buf | The 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] | slot | slot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
  [in] | start | The first channel to set.
  [in] | count | The number of channels to set.
  [in] | buf | The 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] | slot | slot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
  [in] | channel_flags | Reset 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] | slot | slot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
  [in] | channel_flags | Reset 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] | slot | slot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
  [in] | start | The first channel to set.
  [in] | count | The number of channels to set.
  [in] | buf | The 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] | slot | slot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
  [in] | start | The first channel to set.
  [in] | count | The number of channels to set.
  [in] | buf | The 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...