Skip to main content
Skip table of contents

14.1 AIN Extended Features [T-Series Datasheet]

Overview

Analog Input Extended Features (AIN_EF) simplifies many applications by combining data collection and analysis into a single step (register read).

AIN_EF can not be used in the stream scan list. Nor can it be used while streaming is running.

Operation

AIN_EF can be configured for one of several different modes. The selected mode controls how the data is collected and what analysis will be performed on that data. See the table below for a list of available modes.

AIN_EF Modes

Index

AIN-EF Name

Supported Devices

Uses Stream Mode?

0:

None (disabled)

All T-series

-

1:

Offset and Slope

All T-series

-

3:

Max, Min, Avg

All T-series

Yes

4:

Resistance

All T-series

-

5:

Average and Threshold

All T-series

Yes

10:

RMS Flex

All T-series

Yes

11:

RMS Auto

All T-series

Yes

20:

Thermocouple type E

T7/T8

-

21:

Thermocouple type J

T7/T8

-

22:

Thermocouple type K

T7/T8

-

23:

Thermocouple type R

T7/T8

-

24:

Thermocouple type T

T7/T8

-

25:

Thermocouple type S

T7/T8

-

27:

Thermocouple type N

T7/T8

-

28:

Thermocouple type B

T7/T8

-

30:

Thermocouple type C

T7/T8

-

40:

RTD PT100

All T-series

-

41:

RTD PT500

All T-series

-

42:

RTD PT1000

All T-series

-

50:

Thermistor using Steinhart-Hart equation

All T-series

-

51:

Thermistor using Beta equation

All T-series

Data Collection Methods

Depending on the selected mode, data is collected in one of two ways. Some modes require a single analog input (AIN) to be sampled repeatedly. For these modes, the T-Series device internally uses stream mode to acquire the necessary data. Any modes that utilize stream mode will be noted in the mode table.

In contrast, other modes simply require a single reading from one or more analog inputs. These modes operate in a standard command-response manner, similar to a regular read from AINx

Configuration

Configuration of the AIN_EF is accomplished by writing to to following registers:

  • Mode Selection: The desired analysis mode is set by writing its index number to the AIN#_EF_INDEX register.

  • Mode Configuration: Each mode has several configurations which control how the mode collects data and computes results. The mode specific configurations are set using the  AIN#_EF_CONFIG_A through J registers. Refer to the specific mode's documentation for detailed information.

Reading Results

After configuration, the AIN_EF system is idle. Reading from the AIN#_EF_READ_A register initiates the data collection and analysis process. This is a blocking operation, meaning that the read will not return until the process is complete. When complete, the READ_A register returns the primary result of the analysis and the AIN_EF will return to idle. If the selected mode produces more than one result, the additional values are saved and can be read from the AIN#_EF_READ_B, C, and D registers.

The total time for a read operation is determined by the number of samples required, the sampling rate, and the time for analysis and communication. An error will be thrown if the configured process is expected to take longer than 180 ms.

Configuring many channels for AIN_EF

When many analog input channels need to be configured to use an extended feature, there are several options for writing to the requested registers:

  • Kipling's Register Matrix - This option can be tedious. The Lua option is a much better option.

  • Lua - A simple script can be used to easily configure many channels for AIN_EF.

  • Custom application - Many of our customers write their own applications. This  

Boot-up Configuration

The AIN_EF configuration can be saved in flash memory so that it will loaded next time the device boots up. See section 24.0 Device Configuration for more information.

Registers

Examples

Example - Use AIN_EF to apply a slope and an offset to analog input readings.

Configure the AIN_EF settings for AIN0 by writing:

  1. AIN0_EF_INDEX = 1       // This sets AIN0_EF to the offset and slope mode

  2. AIN0_EF_CONFIG_D = 2      // Set the slope to 2

  3. AIN0_EF_CONFIG_E = -1.2   // Set the offset to -1.2

Read from AIN0_EF_READ_A will produce the following results:

  • When the voltage on AIN0 is 5V, the result will be 5*2-1.2 = 8.8 V

  • When the voltage on AIN0 is 0.5, the result will be 0.5*2-1.2 = -0.2 V

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.