get_tc_values()

Converts raw thermocouple data collected using the daq_in_scan() function to data on a temperature scale (Celsius, Fahrenheit, or Kelvin).

Prototype

get_tc_values(board_num, chan_list, chan_type_list, chan_count, memhandle, first_point, count, scale, 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().

chan_type_list (list of ChannelType)

List containing channel values. Valid channel values are analog and temperature input channels and digital ports. chan_list must match the channel list used with daq_in_scan().

chan_type_list (list of ChannelType)

List containing channel types. Each element of this list defines the type of the corresponding element in the chan_list. chan_type_list must match the channel type settings used with daq_in_scan().

chan_count (int)

Number of elements in each of the two lists – chan_list and chan_type_list.

memhandle (int)

This must be a memory handle that was returned by win_buf_alloc() when the buffer was allocated. The buffer should contain the data that you want to convert.

first_point (int)

The index into the raw data memory buffer that holds the first sample of the first channel to be converted. The index into the raw memory is (first_point x chan_count) so that converted data always starts with the first channel specified in the scan. For example, if first_point is 14 and the number of channels is 8, the index of the first converted sample is 112.

count (int)

The number of samples per channel to convert to engineering units. count should not exceed Windows buffer size / chan_count – first_point.

scale (TempScale)

Specifies the temperature scale that the input will be converted to. Choices are TempScale.CELSIUS, TempScale.FAHRENHEIT and TempScale.KELVIN.

data_array (POINTER(c_float), optional)

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.

This array must be large enough to hold count samples × the number of temperature channels.

Returns