beautypg.com

Usb_tc08_get_single – Omega Speaker Systems 8 Channel Thermocouple USB Data Acquisition Module TC-08 User Manual

Page 35

background image

Technical reference

31

3.3.3.3

usb_tc08_get_single

short usb_tc08_get_single
(

short handle,
float * temp,
short * overflow_flags,
short units

)

You must set up the channels before calling this function. You must not have put the
unit into Streaming mode with

usb_tc08_run

, as this will cause

usb_tc08_get_single

to fail. The function will convert all readings on demand. For

more details and an example see the

Get Single mode

section.

Arguments

handle

Specifies the USB TC-08 unit.

temp

Pointer to an array of length [9]. There are 9
channels on the USB TC-08 (8 + cold junction) and
the readings are always placed in the array
subscript corresponding to the channel number.
Channels which are not enabled are filled with
QNaN values.

overflow_flags

Pointer to a variable containing a set of bit flags
that are set high when an overflow occurs on a
particular channel. An overflow occurs when the
input signal is higher than the measuring range of
the USB TC-08.

The lowest significant bit (bit 0) represents channel
0 (the cold juction channel) and bit 8 represents
channel 8 (the last thermocouple channel). Bitwise
comparisons should be performed to determine the
overflow state of each channel.

units

Specifies the temperature units for returned data:

0: USBTC08_UNITS_CENTIGRADE
1: USBTC08_UNITS_FAHRENHEIT
2: USBTC08_UNITS_KELVIN
3: USBTC08_UNITS_RANKINE

Returns

0

An error occurred, use

usb_tc08_get_last_error

to

get the code.

1

The function succeeded.