beautypg.com

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

Page 40

background image

TC-08 User's Guide

36

3.3.4.3

usb_tc08_legacy_get_temp

short usb_tc08_legacy_get_temp
(

long * temp,
short handle,
short channel,
short filtered

)

Once you open the driver and define some channels, you can call the

usb_tc08_legacy_run

routine. The driver will then constantly take readings from the

USB TC-08. Temperatures are returned in hundredths of a degree Celsius and
voltages are returned in microvolts.

Arguments

channel

Specifies from which channel to read temperature. Should
be 0 for CJC, 1 for Channel 1, 2 for Channel 2 and so on.

temp

Pointer to a location where readings are to be placed. Each
reading should be compared with 2147483647L or

LONG_MAX

(include

limits.h

) to check for overflows. An

overflow occurs when the input signal is higher than the
measuring range of the USB TC-08.

filtered

Specifies whether or not to filter the data. The readings
are median filtered if set to 1. 0 causes the unfiltered
temperature to be stored in temp. The filter has a depth
defined by the filter factor, set during a

usb_legacy_set_channel

call.

Returns

0

Use

usb_tc08_get_last_error

.

1

Temperature retrieval successful.

Note: Do not call this function unless you are operating the USB TC-08 in legacy
mode, having called

usb_tc08_legacy_run

.