USB TC-08 Help
11
© 2005 Pico Technology Limited. All rights reserved.
USBTC08044-2
The following code is a fragment of a C application demonstrating how to use Streaming
mode with the USB TC-08 driver:
//==================================================
// Setting up and running the unit in Streaming mode
//==================================================
// use 50Hz mains noise rejection
// set each channel up as a type K thermocouple
// channel 0 is the cold junction and will be enabled
// by setting the third argument to anything other than ' '
// find out how fast the unit can sample in its current setup state
usb_tc08_get_minimum_interval_ms
(handle, minimum_interval);
// sample as fast as possible
// not required (just illustrates that the application
// can be idle while the driver collects the readings)
// use a two dimensional array with an array of readings for each
// In a real application, this would be a nested loop to regularly poll
&reading_buffer[channel],
// do not fill missing readings
// finished polling, now do something with the readings
// if overflows[channel] is high, then one of the readings
// in reading_buffer[channel] has exceeded the input range
// only stop the unit when we've completely finished streaming
Note: You should close down all other applications while you are performing any timing-
critical data logging tasks. Check that the Windows scheduler does not have any activities
planned during the logging session.
3.2.3
Get Single mode
is an operational mode in which readings are produced on demand,
function. Since the function relies entirely on the timing of
the calling application, it is ideal for time intervals greater than 1 minute. If high-speed
sampling is required, use