# t_in_scan

Reads a range of channels from an analog input board, linearizes them according to temperature sensor type, if required, and returns the temperatures to an array in units determined by the scale parameter.

## Prototype

t_in_scan(board_num, low_chan, high_chan, scale, options=0, data_array=None)

## Parameters

board_num (int)

The number associated with the board when it was installed with InstaCal or created with create_daq_device().

low_chan (int)

Low channel of the scan.

high_chan (int)

High channel of the scan.

scale (TempScale)

Specifies the temperature scale that the input will be converted to.

options (TInOptions, optional)

Flags that control various options. Refer to the constants in the "options parameter values" section below.

data_array (POINTER(c_float))

Pointer to the temperature data array. If this parameter is omitted (or None), the array will be allocated by this function. Reusing the array by passing it in as the parameter may be useful as an optimization to prevent excessive allocations, saving memory and CPU time.

## Returns

- err_code (int) – The error code, which will either be ErrorCode.OUTOFRANGE, ErrorCode.OPENCONNECTION, or ErrorCode.NOERRORS. ErrorCode.OUTOFRANGE will be returned if any of the converted data is out of range. This typically indicates an open TC connection. All other errors will raise a ULError as usual.
- data_array (POINTER(c_float)) – A pointer to the C array containing the converted temperature data.

### options parameter values

FILTER | When selected, a smoothing function is applied to temperature readings, very much like the electrical smoothing inherent in all hand held temperature sensor instruments. This is the default. When selected, 10 samples are read from the specified channel and averaged. The average is the reading returned. Averaging removes normally distributed signal line noise.
NOFILTER | If you use the NOFILTER option, the readings will not be smoothed and you will see a scattering of readings around a mean.
WAITFORNEWDATA | Waits for new data to become available.

##### Notes on Scale options

- Specify TempScale.NOSCALE to retrieve raw data from the device. When TempScale.NOSCALE is specified, calibrated data is returned, although a cold junction compensation (CJC) correction factor is not applied to the returned values.
- Specify the TempScale.VOLTS option to read the voltage input of a thermocouple.

Refer to board-specific information to determine if your hardware supports these options.