- Main
- Tutorials
- Library
- Samples

Modules | Functions
AI
Library

## Modules
| AI_RANGE

## Functions
IOTHINX_ERR | ioThinx_AI_GetEngs (uint32_t slot, uint8_t start, uint8_t count, float buf[])
IOTHINX_ERR | ioThinx_AI_GetMinEngs (uint32_t slot, uint8_t start, uint8_t count, float buf[])
IOTHINX_ERR | ioThinx_AI_GetMaxEngs (uint32_t slot, uint8_t start, uint8_t count, float buf[])
IOTHINX_ERR | ioThinx_AI_GetRaws (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
IOTHINX_ERR | ioThinx_AI_GetMinRaws (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
IOTHINX_ERR | ioThinx_AI_GetMaxRaws (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
IOTHINX_ERR | ioThinx_AI_ResetMins (uint32_t slot, uint32_t resets)
IOTHINX_ERR | ioThinx_AI_ResetMaxs (uint32_t slot, uint32_t resets)
IOTHINX_ERR | ioThinx_AI_GetStatuss (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
IOTHINX_ERR | ioThinx_AI_Config_GetRanges (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
IOTHINX_ERR | ioThinx_AI_Config_SetRanges (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
IOTHINX_ERR | ioThinx_AI_Config_GetBurnoutValues (uint32_t slot, uint8_t start, uint8_t count, float buf[])
IOTHINX_ERR | ioThinx_AI_Config_SetBurnoutValues (uint32_t slot, uint8_t start, uint8_t count, float buf[])

## Detailed Description

Sample Code:
ai.c

## Function Documentation

IOTHINX_ERR ioThinx_AI_GetEngs | ( | uint32_t | slot,
|  | uint8_t | start,
|  | uint8_t | count,
|  | float | buf[]
| ) |  |

Parameters

  [in] | slot | Slot number of the I/O module.
  [in] | start | Specifies the start channel.
  [in] | count | The number of channels to be get.
  [out] | buf | An array that stores the AI engineering data for the contiguous channels. buf[0] represents the value of the start channel.

Returns
  IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

IOTHINX_ERR ioThinx_AI_GetMinEngs | ( | uint32_t | slot,
|  | uint8_t | start,
|  | uint8_t | count,
|  | float | buf[]
| ) |  |

Parameters

  [in] | slot | Slot number of the I/O module.
  [in] | start | Specifies the start channel.
  [in] | count | The number of channels to be get.
  [out] | buf | An array that stores the minimum AI engineering data for the contiguous channels. buf[0] represents the value of the start channel.

Returns
  IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

IOTHINX_ERR ioThinx_AI_GetMaxEngs | ( | uint32_t | slot,
|  | uint8_t | start,
|  | uint8_t | count,
|  | float | buf[]
| ) |  |

Parameters

  [in] | slot | Slot number of the I/O module.
  [in] | start | Specifies the start channel.
  [in] | count | The number of channels to be get.
  [out] | buf | An array that stores the maximal AI engineering data for the contiguous channels. buf[0] represents the value of the start channel.

Returns
  IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

IOTHINX_ERR ioThinx_AI_GetRaws | ( | uint32_t | slot,
|  | uint8_t | start,
|  | uint8_t | count,
|  | uint32_t | buf[]
| ) |  |

Parameters

  [in] | slot | Slot number of the I/O module.
  [in] | start | Specifies the start channel.
  [in] | count | The number of channels to be get.
  [out] | buf | An array that stores the AI raw data for the contiguous channels. buf[0] represents the value of the start channel.

Returns
  IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

IOTHINX_ERR ioThinx_AI_GetMinRaws | ( | uint32_t | slot,
|  | uint8_t | start,
|  | uint8_t | count,
|  | uint32_t | buf[]
| ) |  |

Parameters

  [in] | slot | Slot number of the I/O module.
  [in] | start | Specifies the start channel.
  [in] | count | The number of channels to be get.
  [out] | buf | An array that stores the minimal AI raw data for the contiguous channels. buf[0] represents the value of the start channel.

Returns
  IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

IOTHINX_ERR ioThinx_AI_GetMaxRaws | ( | uint32_t | slot,
|  | uint8_t | start,
|  | uint8_t | count,
|  | uint32_t | buf[]
| ) |  |

Parameters

  [in] | slot | Slot number of the I/O module.
  [in] | start | Specifies the start channel.
  [in] | count | The number of channels to be get.
  [out] | buf | An array that stores the maximal AI raw data for the contiguous channels. buf[0] represents the value of the start channel.

Returns
  IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

IOTHINX_ERR ioThinx_AI_ResetMins | ( | uint32_t | slot,
|  | uint32_t | resets
| ) |  |

Parameters

  [in] | slot | Slot number of the I/O module.
  [in] | resets | Stores the minimal value reset flags of the contiguous channels (0: ignore, 1: reset); each bit holds one channel's flag. The bit 0 represents value of the channel 0 and so on.

Returns
  IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

IOTHINX_ERR ioThinx_AI_ResetMaxs | ( | uint32_t | slot,
|  | uint32_t | resets
| ) |  |

Parameters

  [in] | slot | Slot number of the I/O module.
  [in] | resets | Stores the maximal value reset flags of the contiguous channels (0: ignore, 1: reset); each bit holds one channel's flag. The bit 0 represents value of the channel 0 and so on.

Returns
  IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

IOTHINX_ERR ioThinx_AI_GetStatuss | ( | uint32_t | slot,
|  | uint8_t | start,
|  | uint8_t | count,
|  | uint8_t | buf[]
| ) |  |

Parameters

  [in] | slot | Slot number of the I/O module.
  [in] | start | Specifies the start channel.
  [in] | count | The number of channels to be get.
  [out] | buf | An array that stores the AI status for the contiguous channels. buf[0] represents the value of the start channel.

Returns
  IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

IOTHINX_ERR ioThinx_AI_Config_GetRanges | ( | uint32_t | slot,
|  | uint8_t | start,
|  | uint8_t | count,
|  | uint8_t | buf[]
| ) |  |

Parameters

  [in] | slot | Slot number of the I/O module.
  [in] | start | Specifies the start channel.
  [in] | count | The number of channels to be get.
  [out] | buf | An array that stores the AI range for the contiguous channels. buf[0] represents the value of the start channel.

Returns
  IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

IOTHINX_ERR ioThinx_AI_Config_SetRanges | ( | uint32_t | slot,
|  | uint8_t | start,
|  | uint8_t | count,
|  | uint8_t | buf[]
| ) |  |

Parameters

  [in] | slot | Slot number of the I/O module.
  [in] | start | Specifies the start channel.
  [in] | count | The number of channels to be get.
  [in] | buf | An array that stores the AI range for the contiguous channels. buf[0] represents the value of the start channel.

Returns
  IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

IOTHINX_ERR ioThinx_AI_Config_GetBurnoutValues | ( | uint32_t | slot,
|  | uint8_t | start,
|  | uint8_t | count,
|  | float | buf[]
| ) |  |

Parameters

  [in] | slot | Slot number of the I/O module.
  [in] | start | Specifies the start channel.
  [in] | count | The number of channels to be get.
  [out] | buf | An array that stores the burnout value for the contiguous channels. buf[0] represents the value of the start channel.

Returns
  IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

Note
  These values are valid only when the AI range is 4-20mA

IOTHINX_ERR ioThinx_AI_Config_SetBurnoutValues | ( | uint32_t | slot,
|  | uint8_t | start,
|  | uint8_t | count,
|  | float | buf[]
| ) |  |

Parameters

  [in] | slot | Slot number of the I/O module.
  [in] | start | Specifies the start channel.
  [in] | count | The number of channels to be get.
  [in] | buf | An array that stores the burnout value for the contiguous channels. buf[0] represents the value of the start channel.

Returns
  IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

Note
  These values are valid only when the AI range is 4-20mA