User manual

USB TC-08 Help23
Copyright 2004 Pico Technology Limited. All rights reserved.
Arguments:
handle
- Specifies the USB TC-08 unit.
Returns:
-1
- Invalid handle.
Error code
- See the error code information above for further explanation.
3.3.3 New USB mode only
3.3.3.1 usb_tc08_set_channel
short usb_tc08_set_channel ( short
handle,
short channel,
char tc_type)
You should call this routine once for each channel that you want to use. You can do this any time after
calling
usb_tc08_open_unit
. By default, all channels are disabled.
Arguments:
handle
- Specifies the USB TC-08 unit.
channel
- Specifies which channel you want to set the details for: this should be
between 0 - 8 (0 denotes the cold junction.)
tc_type
- Specifies what type of thermocouple is connected to this channel. Set
to one of the following characters: 'B', 'E', 'J', 'K', 'N', 'R', 'S', 'T.' Use a
space in quotes to disable the channel. Voltage readings can be
obtained by passing 'X' as the character.
Returns:
0
- Use
usb_tc08_get_last_error
.
1
- Routine was successful.
Note: The CJC is always enabled automatically if a thermocouple is being used. When no channels
are active as thermocouples, the CJC can be optionally enabled or disabled.
3.3.3.2 usb_tc08_run
long usb_tc08_run( short handle,
long interval)
This routine starts the unit running with a sampling interval, specified in milliseconds. This routine should
be called after
usb_tc08_set_channel
has been called.
Arguments:
handle
- Specifies the USB TC-08 unit.
interval
- S
pecifies the requested sampling period. You can use
usb_tc08_get_minimum_interval_ms
to obtain the smallest sampling
period permitted with the current setup.