PICO USB TC-08 User manual

© 2005 Pico Technology Limited. All rights reserved.
USB TC-08
User guide
USBTC08044-2
Temperature Logger

Table of Contents
.............................................................................................2
1 Introduction
...................................................................................................2
1 Overview
...................................................................................................2
2 Installing the driver
...................................................................................................2
3 Connecting the USB TC-08
...................................................................................................5
4 Legal information
...................................................................................................6
5 Safety warning
...................................................................................................7
6 Company details
.............................................................................................8
2 Product information
...................................................................................................8
1 Specifications
...................................................................................................9
2 How a thermocouple works
.............................................................................................10
3 Technical reference
...................................................................................................10
1 Introduction
...................................................................................................10
2 Modes of operation
...................................................................................................15
3 Driver routines
...................................................................................................34
4 Programming
...................................................................................................36
5 Troubleshooting
...................................................................................................37
6 Glossary
......................................................................................................40
Index
USB TC-08 HelpI
© 2005 Pico Technology Limited. All rights reserved.

Introduction 2
© 2005 Pico Technology Limited. All rights reserved. USBTC08044-2
1Introduction
1.1 Overview
The USB TC-08 is a temperature and voltage logger designed to support multiple
thermocouples. With the accompanying PicoLog software, the unit can be used with any
laptop or PC running Windows 98SE, ME, 2000, XP or higher. If you are technically-
minded and want to tailor the product to a particular application, you can write your own
programs with the supplied driver.
The driver provides
cold junction compensation
for thermocouples. PicoLog supports up
to 10 USB TC-08 devices and the driver can support more (as many as 64, if you have a
high-specification PC.)
This manual describes the physical and electrical properties of the USB TC-08, and
provides an explanation of how to use the software drivers. For information on PicoLog,
please consult the PicoLog help file.
1.2 Installing the driver
The driver is installed automatically when you install the PicoLog software. Alternatively,
you can download the driver from our website at
http://www.picotech.com
.
1.3 Connecting the USB TC-08
Please note: do not connect the USB TC-08 until you have installed the software
and restarted your PC.
To begin using the USB TC-08, connect it to the USB port on your computer using the
cable provided. Next, connect a thermocouple to one of the thermocouple input
connectors. To complete the installation, select the USB TC-08 unit and thermocouple
type in PicoLog as follows:
1. Start up PicoLog Recorder
2. Select
New Settings
from the
File
menu.
The Recording dialog box appears

USB TC-08 Help
3
© 2005 Pico Technology Limited. All rights reserved.
USBTC08044-2
3. Click the
OK
button.
The Sampling Rate dialog box appears
4. Click the
OK
button.
The Converter details dialog box appears
5. Select
USB TC-08
from the drop-down list of converters.
The device name and serial number should appear in the USB Devices pane and the
USB enumeration progress bar gradually expands to 100%. If the progress bar does
not start moving, disconnect and reconnect the USB TC-08, then click
Refresh
6. In the USB Devices pane, select the
USB TC-08
.
If you are using more than one USB
TC-08, check the serial number on the bottom of the device so that you know which
one to select from the list
7. Click the
OK
button.
The following dialog box appears

Introduction 4
© 2005 Pico Technology Limited. All rights reserved. USBTC08044-2
8. In the TC-08 Channels window, double-click on
Channel 1 unused
The Edit TC-08 Channel dialog box appears
9. From the
Thermocouple
drop-down list, select the type of thermocouple you are using
and click the
OK
button
.
The TC-08 Channels dialog box reappears
10. Click the
OK
button.
Channel 1 should now appear in the monitor window with the current temperature
reading.

USB TC-08 Help
5
© 2005 Pico Technology Limited. All rights reserved.
USBTC08044-2
1.4 Legal information
The material contained in this release is licensed, not sold. Pico Technology Limited
grants a licence to the person who installs this software, subject to the conditions listed
below.
Access
The licensee agrees to allow access to this software only to persons who have been
informed of these conditions and agree to abide by them.
Usage
The software in this release is for use only with Pico products or with data collected using
Pico products.
Copyright
Pico Technology Limited claims the copyright of, and retains the rights to, all material
(software, documents etc.) contained in this release. You may copy and distribute the
entire release in its original state, but must not copy individual items within the release
other than for backup purposes.
Liability
Pico Technology and its agents shall not be liable for any loss, damage or injury,
howsoever caused, related to the use of Pico Technology equipment or software, unless
excluded by statute.
Fitness for purpose
No two applications are the same: Pico Technology cannot guarantee that its equipment
or software is suitable for a given application. It is your responsibility, therefore, to ensure
that the product is suitable for your application.
Mission-critical applications
This software is intended for use on a computer that may be running other software
products. For this reason, one of the conditions of the licence is that it excludes usage in
mission critical applications, for example life support systems.
Viruses
This software was continuously monitored for viruses during production, however you are
responsible for virus-checking the software once it is installed.
Support
If you are unsatisfied with the performance of this software, please contact our technical
support staff, who will try to fix the problem within a reasonable time scale. If you are still
unsatisfied, please return the product and software to your supplier within 28 days of
purchase for a full refund.
Upgrades
We provide upgrades, free of charge, from our web site at
www.picotech.com
. We
reserve the right to charge for updates or replacements sent out on physical media.

Introduction 6
© 2005 Pico Technology Limited. All rights reserved. USBTC08044-2
Trademarks
Pico Technology Limited
,
PicoScope
,
PicoLog
,
DrDAQ
and
EnviroMon
are
trademarks of Pico Technology Limited, and are registered in the United Kingdom and
other countries
Pico Technology acknowledges the following product names as trademarks of their
respective owners:
Windows
,
Excel
,
Visual Basic
,
LabVIEW
,
Agilent VEE
,
HP VEE
,
Delphi
.
1.5 Safety warning
We strongly recommend that you read the general safety information below before using
your product for the first time. If the equipment is not used in the manner specified, then
the protection provided may be impaired. This could result in damage to your computer
and/or injury to yourself or others.
Maximum input range
The USB TC-08 is designed to measure voltages in the range of ±70 mV. Any voltages in
excess of ±30 V may cause permanent damage to the unit.
Mains voltages
Pico products are not designed for use with mains voltages.
Safety grounding
The ground of every product is connected directly to the ground of your computer through
the interconnecting cable provided. This is done in order to minimise interference. If the
PC (especially laptop) is not grounded, reading stability cannot be guaranteed and it may
be necessary to manually ground the equipment.
As with most oscilloscopes and data loggers, you should take care to avoid connecting
the inputs of the product to anything which may be at a hazardous voltage. If in doubt,
use a meter to check that there is no hazardous AC or DC voltage. Failure to check may
cause damage to the product and/or computer and could cause injury to yourself or
others.
Take great care when measuring temperatures near mains equipment. If a sensor is
accidentally connected to mains voltages, you risk damage to the converter or your
computer and your computer chassis may become live.
You should assume that the product does not have a protective safety earth. Incorrect
configuration or use of the device to measure voltages outside the maximum input range
can be hazardous.
Repairs
The unit contains no user-serviceable parts: repair or calibration of the unit requires
specialised test equipment and must be performed by Pico Technology Limited or their
authorised distributors.

USB TC-08 Help
7
© 2005 Pico Technology Limited. All rights reserved.
USBTC08044-2
1.6 Company details
Address:
Pico Technology Limited
The Mill House
Cambridge Street
St Neots
Cambridgeshire
PE19 1QB
United Kingdom
Phone:
+44 (0)1480 396395
Fax:
+44 (0)1480 396296
Email:
Technical Support:
Sales:
Web site:
www.picotech.com

Product information 8
© 2005 Pico Technology Limited. All rights reserved. USBTC08044-2
2Product information
2.1 Specifications
Resolution
20 bits (16.25
NFR)
Thermocouple types
B,
E,
J,
K,
N,
R,
S,
T
Number of input channels
8
Conversion time - per active channel
100 ms
Conversion time -
CJC
100 ms
Uncalibrated accuracy
The sum of ±0.2% and ±0.5
°
C
Full scale input
±70 mV
Common mode range
±7.5 V
Overvoltage protection
±30 V
Input impedance
2 M
W
Input connectors
8 x miniature thermocouple
Output connector
USB upstream connector
Power requirements
No power supply required
Environmental conditions
0 to 50
°
C, 25% to 75% humidity
Quoted accuracy over 20 - 30
°
C
NOT water-resistant
Note: The resolution and accuracy depend upon the thermocouple type and the
temperature range. Below is a list of the thermocouples and temperature ranges
supported by the USB TC-08.
Actual measurable range
Theoretical ranges
CJC
-5
°
C
to 70
°
C
N/a
Type B
20
°
C to 1820
°
C (CJC must be
>20
°
C)
0
°
C
to 1820
°
C
Type E
-270
°
C
to 910
°
C
-270
°
C
to 1000
°
C
Type J
-210
°
C
to 1200
°
C
-210
°
C
to 1200
°
C
Type K
-270
°
C
to 1370
°
C
-270
°
C
to 1370
°
C
Type N
-270
°
C
to 1300
°
C
-270
°
C
to 1300
°
C
Type R
-50
°
C
to 1760
°
C
-50
°
C
to 1760
°
C
Type S
-50
°
C
to 1760
°
C
-50
°
C
to 1760
°
C
Type T
-270
°
C
to 400
°
C
-270
°
C
to 400
°
C

USB TC-08 Help
9
© 2005 Pico Technology Limited. All rights reserved.
USBTC08044-2
2.2 How a thermocouple works
A discovery by T. J. Seebeck almost 150 years ago opened the way for modern
thermoelectric circuitry. In 1831, Seebeck discovered that an electric current flows in a
closed circuit of two dissimilar metals when one of the two junctions is heated with respect
to the other.
In such a thermocouple circuit the current continues to flow as long as the two junctions
are at different temperatures. The magnitude and direction of the current is a function of
the temperature difference between the junctions and of the thermal properties of the
metals used in the circuit. This phenomenon is known as the Seebeck Effect.
The conductors can be made of any two dissimilar metals, and when the hot junction is
heated the current flow can be observed. If the positions of the hot and cold junctions are
reversed, current flows in the opposite direction.
In fact, a thermocouple circuit actually generates a measurable, low voltage output that is
almost directly proportional to the temperature difference between the hot junction and
the cold junction. A change in this temperature difference produces some net change in
the voltage.
Note: More information on choosing and using thermocouples can be found
at this page on our website
.

Technical reference 10
© 2005 Pico Technology Limited. All rights reserved. USBTC08044-2
3Technical reference
3.1 Introduction
The USB TC-08 is supplied with driver routines that you can build into your own
programs. The USB TC-08 driver supports the following versions of the Windows
operating system: 98SE, ME, 2000, and XP.
Once you have installed the software, the
DRIVERS
directory will contain the drivers and a
selection of examples of how to use the drivers.
The driver is supplied as a Windows
DLL
. The DLL uses the C
stdcall
calling
convention and can be used with C, Delphi and Visual Basic programs. It can also be
used with programs like Microsoft Excel, where the macro language is a form of Visual
Basic.
3.2 Modes of operation
3.2.1 Introduction
The USB TC-08 is designed for three specific modes of operation to suit a variety of
applications. The following modes are supported:
Streaming mode
Get Single mode
Legacy mode
3.2.2 Streaming mode
Streaming mode
is an operational mode in which the USB TC-08 unit samples data and
returns it to the computer in an unbroken sequence, using the onboard clock to ensure
accurate timing.
The unit can buffer up to two sets of readings at once. To avoid loss of readings, make
sure that another application on the PC - including the one you are writing - does not
prevent the driver from collecting readings for more than three sampling intervals.
To allow the driver to sample continuously, call the Windows
Sleep()
function in any
sampling loops (see example below) to make sure that your application does not use too
much processor time.
Hint:
Try not to use a
Sleep()
call for less than 50-100 milliseconds, e.g.,
Sleep(50)
or
Sleep(100)
. If you are programming a Windows GUI application, a good alternative
to sampling loops is the
WM_TIMER
message.

USB TC-08 Help
11
© 2005 Pico Technology Limited. All rights reserved.
USBTC08044-2
Example
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
//==================================================
usb_tc08_set_mains
(handle,
0
);
// use 50Hz mains noise rejection
for
(channel =
0
; channel <
9
; channel++)
{
// 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 ' '
usb_tc08_set_channel
(handle, channel,
'K'
);
}
// find out how fast the unit can sample in its current setup state
minimum_interval =
usb_tc08_get_minimum_interval_ms
(handle);
usb_tc08_run
(handle, minimum_interval);
// sample as fast as possible
// not required (just illustrates that the application
// can be idle while the driver collects the readings)
Sleep(
10000
);
// use a two dimensional array with an array of readings for each
channel
// In a real application, this would be a nested loop to regularly poll
// the unit for readings
for
(channel =
0
; channel <
9
; channel++)
{
no_of_readings =
usb_tc08_get_temp
( handle,
&reading_buffer[channel],
×_buffer[channel],
buffer_length,
&overflows[channel],
channel,
0
,
// degrees Celsius units
0
);
// 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
// of the USB TC-08
// only stop the unit when we've completely finished streaming
usb_tc08_stop
(handle);
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
Get Single mode
is an operational mode in which readings are produced on demand,
using the
usb_tc08_get_single
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
Streaming mode
.

Technical reference 12
© 2005 Pico Technology Limited. All rights reserved. USBTC08044-2
Note: The function call overhead can be significant, since it takes approximately 360 ms
to convert all 9 channels, equating to 40 ms per channel. To reduce this overhead,
disable channels that are not required.
Example
The following code is a fragment of a C application demonstrating how to use Get Single
mode with the USB TC-08 driver:
//========================================================
// Setting up and converting readings with Get Single mode
//========================================================
usb_tc08_set_mains
(handle,
0
);
// use 50Hz mains noise rejection
for
(channel =
0
; channel <
9
; channel++)
{
// 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 ' '
usb_tc08_set_channel
(handle, channel,
'K'
);
}
// find out the approximate conversion time
// for a call to usb_tc08_get_single
minimum_interval =
usb_tc08_get_minimum_interval_ms
(handle);
printf(
"Conversion time: %d\n"
, minimum_interval);
// Collect 10 readings over approximately 9 minutes
last_time = GetTickCount();
for
(i =
0
, i <
10
, i++)
{
// do the conversion for all channels
usb_tc08_get_single
( handle,
value_array,
// short value_array[9]
&overflow_flags,
0
);
// degrees Celsius units
// print out the values
printf(
"\n\nTime: %d minute(s)"
, i);
for
(c =
0
; c <
9
; c++)
{
// check for overflows on each channel
// with a bitwise & comparator
// shift the comparison bit to match the channel
if
(overflow_flags & (
1
<< c))
{
printf(
"\nChannel %d overflowed"
, c);
}
else
// no overflow
{
printf(
"\nChannel %d: %f"
, c, value_array[c]);
}
}
if
(i <
9
)
{
while
(
60000
>
(GetTickCount() - last_time))
// 60000ms = 1 minute
{
Sleep(
100
);
// let other applications run
}
last_time = GetTickCount();
}
}

USB TC-08 Help
13
© 2005 Pico Technology Limited. All rights reserved.
USBTC08044-2
3.2.4 Legacy mode
Legacy mode
is designed to aid developers who have already written code for the serial
version of the TC-08 and are not yet ready to rewrite their code for the
Streaming
or
Get Single
modes available with the USB version. The legacy support is going to be
phased out and will eventually be removed from the driver altogether. If you want full
support in the future, use the Streaming or Get Single modes.
To allow code to be easily developed for both the serial version and the USB version of
the TC-08, all the function names have been changed. The
usb_tc08_legacy_set_channel
function no longer supports offset and gain - this is now
stored only as calibration information in the unit itself. The legacy routines will be familiar
if you previously used the serial TC-08, but the following changes should be made to
convert legacy applications:
Reference the new Header file
Reference the new Library file
Place the new
DLL
in the directory of the application
Set the mains frequency
Run and stop the unit
Store a handle returned from
usb_tc08_open_unit
instead of using the serial port
number

Technical reference 14
© 2005 Pico Technology Limited. All rights reserved. USBTC08044-2
Example
The following code is a fragment of a C application demonstrating how to use legacy
mode with the USB TC-08 driver:
//==========================================================
// Setting up and running the unit in Legacy mode
// This is designed to make it easier to adapt code written
// for the Serial TC08 for use with the USB TC08
//==========================================================
usb_tc08_set_mains
(handle,
0
);
// use 50Hz mains noise rejection
for
(channel =
1
; channel <
9
; channel++)
{
// set each channel up as a type K thermocouple
// switch off filtering for all channels
usb_tc08_legacy_set_channel
(handle, channel,
'K'
,
0
);
}
usb_tc08_legacy_run
(handle);
last_cycle_no =
0
;
no_of_readings =
0
;
while
(no_of_readings <
50
)
// collect 50 readings
{
usb_tc08_legacy_get_cycle
(handle, &this_cycle_no);
if
(last_cycle_no != this_cycle_no)
{
last_cycle_no = this_cycle_no;
no_of_readings++;
for
(channel =
1
; channel <
9
; channel++)
{
usb_tc08_legacy_get_temp
( &reading[channel],
handle,
channel,
0
);
}
// now do something with the readings
// check that they have not overflowed
// by comparing each reading with 2147483647L
// or LONG_MAX (include limits.h)
usb_tc08_legacy_get_cold_junction
(handle, &cold_junction);
// now do something with the cold junction temperature
}
}
usb_tc08_stop
(handle);

USB TC-08 Help
15
© 2005 Pico Technology Limited. All rights reserved.
USBTC08044-2
3.3 Driver routines
3.3.1 Introduction
The following table explains each of the USB TC-08 routines:
Routine
Description
New USB and serial mode
usb_tc08_open_unit
Opens the USB TC-08 unit and gets a valid USB
handle.
usb_tc08_open_unit_async
Opens the unit asynchronously.
usb_tc08_open_unit_progress
Polls the unit's enumeration progress during
asynchronous operation.
usb_tc08_close_unit
Closes the handle.
usb_tc08_stop
Stops the unit streaming.
usb_tc08_set_mains
Sets the mains interference rejection filter to
either 50 Hz or 60 Hz.
usb_tc08_get_minimum_interval_ms
Returns the minimum sampling interval for the
current setup.
usb_tc08_get_unit_info
Retrieves information on a particular unit and
presents it as a structure.
usb_tc08_get_formatted_info
Retrieves information on a particular unit and
presents it in string form.
usb_tc08_get_last_error
Returns the last error for a specified unit or for a
call to open a unit.
New USB mode only
usb_tc08_set_channel
Sets up a USB TC-08 channel.
usb_tc08_run
Starts the USB TC-08 unit streaming.
usb_tc08_get_single
Converts readings from currently set up channels
on demand.
usb_tc08_get_temp
In streaming mode, retrieves temperature
readings from a specified channel.
usb_tc08_get_temp_deskew
In streaming mode, retrieves temperature
readings from a specified channel with time
deskewed.
Legacy mode only
usb_tc08_legacy_run
Starts the USB TC-08 unit running in legacy
mode.
usb_tc08_legacy_set_channel
Sets up a USB TC-08 channel.
usb_tc08_legacy_get_temp
Retrieves temperature readings from a specified
channel.
usb_tc08_legacy_get_cold_junction
Retrieves a temperature reading for the cold
junction.
usb_tc08_legacy_get_driver_version
Returns the driver version.
usb_tc08_legacy_get_version
Returns the hardware version of the USB TC-08
unit.
usb_tc08_legacy_get_cycle
Returns the number of readings taken so far.

Technical reference 16
© 2005 Pico Technology Limited. All rights reserved. USBTC08044-2
3.3.2 New USB mode and legacy mode
3.3.2.1 usb_tc08_open_unit
short usb_tc08_open_unit (void)
This routine returns a valid handle to the USB TC-08 if the driver successfully opens it. If
the routine fais, see the error code explanations in the
usb_tc08_get_last_error
section.
If
you wish to use more than one USB TC-08, call this routine once for each unit connected
to the PC. The function will return 0 if there are no more units found. The driver is thread-
safe and will not allow access to a single unit from more than one application. If,
therefore,
usb_tc08_open_unit
does not find a unit, check that other applications are
not using the USB TC-08. This includes applications on other user accounts on the same
computer, where fast user switching is supported.
Note: The
usb_tc08_open_unit
function provides a simple way to open USB TC-08
units. However, the function call locks up the calling thread until the attached USB TC-08
unit has been fully enumerated. If a single-threaded application needs to perform
concurrent processing, such as displaying a progress bar, use
usb_tc08_open_unit_async
.
Arguments:
None
Returns:
Positive short
- The handle to a unit.
0
- No more units were found.
-1
- Unit failed to open. Call
usb_tc08_get_last_error
with a handle of
0 to obtain the error code.
Example
The following code is a fragment of a C application which demonstrates how to open
multiple units with the USB TC-08 driver. The handles to the open units are stored in an
array for later use:
//======================================================
// Opening multiple units
//======================================================
for
(i =
0
; (new_handle =
usb_tc08_open_unit
()) >
0
; i++)
{
// store the handle in an array
handle_array[i] = new_handle;
}
no_of_units = i;
// deal with the error if there is one,
// if new_handle was zero, then there was no error
// and we reached the last available unit
if
(new_handle == -
1
)
{
error_code =
usb_tc08_get_last_error
(
0
);
printf(
"Unit failed to open\nThe error code is %d"
, error_code);
// could terminate the application here
}
//

USB TC-08 Help
17
© 2005 Pico Technology Limited. All rights reserved.
USBTC08044-2
// Start using the open units
//
3.3.2.2 usb_tc08_open_unit_async
short usb_tc08_open_unit_async (void)
This routine begins enumerating USB TC-08 units in the background and provides a
return immediately, so the calling thread can continue executing other code.
Note: The driver is thread safe and will not allow access to a single unit from more than
one application. If, therefore,
usb_tc08_open_unit_async
does not find a unit, check
that other applications are not using the same USB TC-08. This includes applications on
other user accounts on the same computer, where fast user switching is supported.
Arguments
None
Returns:
1
- The call was successful.
0
- No more units were found.
-1
- An error occurred, call
usb_tc08_get_last_error
with a handle of 0 to
obtain the error code.
Example
The following code is a fragment of a C application which demonstrates how to open a
single unit with the asynchronous open unit functions:
//======================================================
// Opening a unit asynchronously
//======================================================
// Tell the driver to start enumerating the unit in the background
// (usb_tc08_open_unit_async returns immediately)
result =
usb_tc08_open_unit_async
();
// handle any error conditions
if
(result == -
1
)
{
error_code =
usb_tc08_get_last_error
(
0
);
printf(
"Unit failed to open\nThe error code is %d"
, error_code);
// could terminate the application here
}
else
if
(result ==
0
)
{
printf(
"No USB TC08 units found"
);
// could terminate the application here
}
// No errors, so start polling usb_tc08_open_unit_progress
// continuously for its enumeration state
do
{
result =
usb_tc08_open_unit_progress
(&handle, &progress);
switch
(result)
{

Technical reference 18
© 2005 Pico Technology Limited. All rights reserved. USBTC08044-2
case
USBTC08_PROGRESS_FAIL:
// enum equates to: -1
error_code =
usb_tc08_get_last_error
(
0
);
printf(
"Unit failed to open\nThe error code is %d"
, error_code);
// could terminate the application here
break
;
case
USBTC08_PROGRESS_PENDING:
// enum equates to: 0
printf(
"\nThe unit is %d percent enumerated"
, progress);
Sleep(
500
);
// wait for approx. half a second
break
;
case
USBTC08_PROGRESS_COMPLETE:
// enum equates to: 1
printf(
"\n\nThe unit with handle '%d', opened successfully"
,
handle);
break
;
}
}
while
(result == USBTC08_PROGRESS_PENDING);
//
// Start using the open unit
//
3.3.2.3 usb_tc08_open_unit_progress
short usb_tc08_open_unit_progress( short * handle,
short * progress)
Call this function after
usb_tc08_open_unit_async
. Repeatedly call it to determine
the state of the background enumeration process. For an example of usage, see
usb_tc08_open_unit_async
.
Arguments:
handle
(Out) A handle (positive short) to the unit if the enumeration
is completed. Handle will always be 0 if the enumeration is
incomplete.
progress
(Out) (Optional - can pass NULL) returns a number from 0 to
100 representing the percentage completion of the
enumeration of one unit.
Returns:
-1 (USBTC08_PROGRESS_FAIL)
An error occurred, call
usb_tc08_get_last_error
with a
handle of 0 to obtain the error
code.
0 (USBTC08_PROGRESS_PENDING)
Enumeration has not completed
(keep calling
usb_tc08_open_unit_progres
s
).
1 (USBTC08_PROGRESS_COMPLETE)
Enumeration has completed and
the handle is now valid.

USB TC-08 Help
19
© 2005 Pico Technology Limited. All rights reserved.
USBTC08044-2
3.3.2.4 usb_tc08_close_unit
short tc08_close_unit(short handle)
This routine closes the unit for a specified USB handle.
Arguments:
handle
- Specifies the USB TC-08 unit.
Returns:
0
- Use
usb_tc08_get_last_error
.
1
- Unit closed successfully
.
Note: If you successfully open any USB TC-08 units, call
usb_tc08_close_unit
for each
handle before you exit from your program. If you do not, there is a chance that the unit will
not reopen until it has been disconnected and reconnected.
3.3.2.5 usb_tc08_stop
short usb_tc08_stop (short handle)
This routine stops the unit from running.
Arguments:
handle
- Specifies the USB TC-08 unit.
Returns:
0
- Invalid parameter.
1
- Unit stopped streaming successfully.
3.3.2.6 usb_tc08_set_mains
short usb_tc08_set_mains( short handle,
short sixty_hertz)
This routine sets the USB TC-08 to reject either 50 or 60 Hz.
Arguments:
handle
- Specifies the USB TC-08 unit.
sixty_hertz
- Specifies whether to reject 50Hz or 60Hz. If set to 1,
the unit will reject 60Hz, if set to 0, the unit will reject
50Hz.
Returns:
0
- Use
usb_tc08_get_last_error
.
1
- Mains rejection set correctly.
Note: If the rejection is not set correctly the unit will be more susceptible to mains
interference.
Other manuals for USB TC-08
1
Table of contents
Other PICO Data Logger manuals