User’s Guide Shop online at omega.com e-mail: info@omega.com For latest product manuals: omegamanual.
OMEGAnet ® Online Service omega.com Internet e-mail info@omega.com Servicing North America: U.S.A.: ISO 9001 Certified Canada: One Omega Drive, P.O. Box 4047 Stamford, CT 06907-0047 TEL: (203) 359-1660 FAX: (203) 359-7700 e-mail: info@omega.com 976 Bergar Laval (Quebec) H7L 5A1, Canada TEL: (514) 856-6928 FAX: (514) 856-6886 e-mail: info@omega.ca For immediate technical or application assistance: U.S.A.
Contents I Contents 1 Introduction .....................................................................................................................................1 ...........................................................................................................................................1 1 Overview ...........................................................................................................................................1 2 Installing the driver .......................
Introduction 1 Introduction 1.1 Overview 1 The USB TC-08 is a temperature and voltage logger designed to support multiple thermocouples. With the accompanying TC-08 software, the unit can be used with any laptop or PC running Windows XP SP2 or Vista. 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.
2 TC-08 User's Guide 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 expand 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.
Introduction 3 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 OK. The TC-08 Channels dialog box reappears. 10. Click OK. Channel 1 should now appear in the monitor window with the current temperature reading.
4 1.4 TC-08 User's Guide 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.
Product information 2 Product 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.
6 2.2 TC-08 User's Guide How a thermocouple works In a closed circuit of two dissimilar metals (a thermocouple), an electric current flows when one of the two junctions is heated with respect to the other. 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.
Technical reference 3 Technical reference 3.1 Introduction 7 The USB TC-08 is supplied with driver routines that you can build into your own programs. The USB TC-08 driver supports Windows XP SP2 and Windows Vista. Once you have installed the software, the Examples 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.
8 3.2.2 TC-08 User's Guide 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.
Technical reference 9 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
10 3.2.3 TC-08 User's Guide 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. 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.
Technical reference 11 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
12 3.2.4 TC-08 User's Guide 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.
Technical reference 13 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
14 TC-08 User's Guide 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 usb_tc08_open_unit_async usb_tc08_open_unit_progress Opens the USB TC-08 unit and gets a valid USB handle. Opens the unit asynchronously. Polls the unit's enumeration progress during asynchronous operation. usb_tc08_close_unit Closes the handle. usb_tc08_stop Stops the unit streaming.
Technical reference 3.3.2 New USB mode and legacy mode 3.3.2.1 usb_tc08_open_unit 15 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 fails, 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.
16 TC-08 User's Guide Returns Positive short The handle of 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.
Technical reference 17 Example The following code is a fragment of a C application which demonstrates how to open multiple units with the USB TC-08 driver.
18 3.3.2.2 TC-08 User's Guide 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.
Technical reference 19 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 (res
20 3.3.2.3 TC-08 User's Guide 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.
Technical reference 3.3.2.4 21 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.
22 3.3.2.5 TC-08 User's Guide usb_tc08_stop short usb_tc08_stop ( short handle ) This routine stops the unit from running. Arguments handle Returns Specifies the USB TC-08 unit. 0 Invalid parameter. 1 Unit stopped streaming successfully.
Technical reference 3.3.2.6 23 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 50 Hz or 60 Hz. If set to 1, the unit will reject 60 Hz, if set to 0, the unit will reject 50 Hz. Returns 0 Use usb_tc08_get_last_error. 1 Mains rejection set correctly.
24 3.3.2.7 TC-08 User's Guide usb_tc08_get_minimum_interval_ms long usb_tc08_get_minimum_interval_ms ( short handle ) This routine returns the minimum sampling interval (or fastest millisecond interval) that the unit can achieve in its current configuration. The configuration is defined by calling usb_tc08_set_channel(). Arguments handle Returns Specifies the USB TC-08 unit. 0 Use usb_tc08_get_last_error. Minimum Interval Minimum sampling interval for current setup (in milliseconds).
Technical reference 3.3.2.8 25 usb_tc08_get_unit_info short usb_tc08_get_unit_info ( short handle, USBTC08_INFO * info ) This routine gets the unit information and copies it to the USBTC08_INFO structure, declared in the usbtc08.h header file. If you pass zero to the function as the handle, only the driver version member will be valid, but the function will return 1 (success.) Arguments handle Returns Specifies the TC-08 unit. info A pointer to a structure containing unit information.
26 3.3.2.9 TC-08 User's Guide usb_tc08_get_formatted_info short usb_get_formatted_info ( short handle, char * unit_info, short string_length ) This function is similar to the usb_get_unit_info routine, but the unit information is returned in the form of a formatted character string. The string is separated into the following elements, each appearing on a different line: driver version; hardware version; variant info; serial number; calibration date.
Technical reference 27 3.3.2.10 usb_tc08_get_last_error short usb_tc08_get_last_error ( short handle ) This routine returns the last error for the unit specified by handle. If zero is passed instead of a handle, the function returns the error associated with the last call to usb_tc08_open_unit or usb_tc08_open_unit_async. Note: If an invalid handle is passed to a function, the function will fail.
28 TC-08 User's Guide Reserved error codes Error code Error Further information 7 USBTC08_ERROR_NOT_RESPONDING 8 9 10 11 12 13 14 USBTC08_ERROR_FW_FAIL USBTC08_ERROR_CONFIG_FAIL USBTC08_ERROR_NOT_FOUND USBTC08_ERROR_THREAD_FAIL USBTC08_ERROR_PIPE_INFO_FAIL USBTC08_ERROR_NOT_CALIBRATED USBTC08_ERROR_PICOPP_TOO_OLD Cannot get a reply back from a USB TC-08 unit. Unable to download firmware. Missing or corrupted EEPROM. Cannot find enumerated device. A threading function failed.
Technical reference 3.3.3 New USB mode only 3.3.3.1 usb_tc08_set_channel 29 short usb_tc08_set_channel ( short handle, short channel, char tc_type ) 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 channel tc_type Returns Specifies the USB TC-08 unit. Specifies which channel you want to set the details for: this should be between 0 - 8 (0 denotes the cold junction.
30 3.3.3.2 TC-08 User's Guide 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 Returns Specifies the USB TC-08 unit. interval Specifies the requested sampling period. You can use usb_tc08_get_minimum_interval_ms to obtain the smallest sampling period permitted with the current setup.
Technical reference 3.3.3.3 31 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.
32 3.3.3.4 TC-08 User's Guide usb_tc08_get_temp long usb_tc08_get_temp ( short handle, float * temp_buffer, long * times_ms_buffer, long buffer_length, short * overflow, short channel, short units, short fill_missing ) Once you open the driver and set up some channels, you can call the usb_tc08_run routine. The driver will then begin to continually take readings from the USB TC-08. Use the usb_tc08_get_temp routine to retrieve readings from the driver's buffer periodically.
Technical reference 3.3.3.5 33 usb_tc08_get_temp_deskew long usb_tc08_get_temp_deskew ( short handle, float * temp, long * times, long buffer_length, short * overflow, short channel, short units, short fill_missing ) Same as usb_tc08_get_temp but the times take account of small differences caused by the order in which channels are converted. Note: Unless there is a specific reason to use the usb_tc08_get_temp_deskewed routine, use usb_tc08_get_temp instead.
34 TC-08 User's Guide 3.3.4 Legacy mode only 3.3.4.1 usb_tc08_legacy_run short usb_tc08_legacy_run ( short handle ) This routine starts the sampling thread and forces the specified unit to run in legacy mode. Arguments handle Returns Specifies the USB TC-08 unit. 0 Use usb_tc08_get_last_error. 1 Legacy run successful.
Technical reference 3.3.4.2 35 usb_tc08_legacy_set_channel short usb_tc08_legacy_set_channel ( short handle, short channel, char tc_type, short filter_factor, short offset, short slope ) Call this routine once for each channel that you would like to take readings from. You can do this any time after calling usb_tc08_open_unit. Arguments handle Specifies the USB TC-08 unit. channel Specifies which channel you want to set the details for: This should be between 0 and 8.
36 3.3.4.3 TC-08 User's Guide 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 temp filtered Returns Specifies from which channel to read temperature.
Technical reference 3.3.4.4 37 usb_tc08_legacy_get_cold_junction short usb_tc08_legacy_get_cold_junction ( long * temp, short handle ) This routine retrieves a cold junction temperature reading. This can also be achieved by passing channel = 0 to usb_tc08_get_temp. Temperatures are returned in hundredths of a degree Celsius. Normally, you do not need to worry about the cold junction temperature, as the driver automatically uses it to compensate thermocouples.
38 3.3.4.5 TC-08 User's Guide usb_tc08_legacy_get_driver_version short usb_tc08_legacy_get_driver_version ( void ) This routine returns the driver version. This is useful when you need to find out if the latest driver is being used.
Technical reference 3.3.4.6 usb_tc08_legacy_get_version short usb_tc08_legacy_get_version ( short * version, short handle ) This routine sets the 'version' variable to match the version of the USB TC-08 currently being used. Arguments handle Specifies the USB TC-08 unit. version Pointer to a location where the version number is to be stored. Returns 0 Invalid handle. 1 Retrieval of version number successful.
40 3.3.4.7 TC-08 User's Guide usb_tc08_legacy_get_cycle short usb_tc08_legacy_get_cycle ( long * cycle, short handle ) This routine gives the number of complete cycles of readings taken from a particular USB TC-08. Calling usb_tc08_legacy_get_temp causes the most recent reading for the specified channel to be returned immediately. If you wish to record values only when the driver has taken a new reading, you can use this routine to find out how many complete cycles of readings the driver has taken.
Technical reference 3.4 Programming 3.4.1 Introduction 41 We supply examples for the following programming languages: C and C++ Delphi Excel LabVIEW Visual Basic Agilent VEE The example programs are installed in the Examples subdirectory of your TC-08 program directory. 3.4.2 C and C++ C The C example program is a generic Windows application: it does not use Borland AppExpert or Microsoft AppWizard. To compile the program, create a new project containing the following files: usb_tc08.c usb_tc08.
42 3.4.4 TC-08 User's Guide Excel The easiest way to transfer data to Excel is to use the TC-08 software application. If, however, you need to do something that is not possible using the TC-08 software, you can write an Excel macro which calls usbtc08.dll to read in a set of data values. The Excel Macro language is similar to Visual Basic. The example usbTC0832.XLS reads in 20 values of the cold junction temperature and channel 1 temperature, one per second, and assigns them to cells A1..B20. 3.4.
Technical reference 3.5 43 Troubleshooting The following table lists each of the error codes described in the usb_tc08_get_last_error section, and divides them into categories, so that you know what to do in the event of a particular error occurring.
44 3.6 TC-08 User's Guide Glossary CJC. A method of compensating for ambient temperature variations in thermocouple circuits. Cold junction compensation. See CJC. Common mode range. The voltage range, relative to the ground of the data logger, within which both inputs of a differential measurement must lie in order to achieve an accurate measurement. DLL. Dynamic Link Library. Files with this file extension contain a collection of Windows functions designed to perform a specific class of operations.
Technical reference 45 Type K thermocouple. Type K thermocouples are low-cost, general-purpose thermocouples, made from chromel and alumel, operating in the -270°C to +1370°C temperature range. Sensitivity is approx 41 uV/°C. Type N thermocouple. Type N thermocouples are made from nicrosil and nisil. The high stability and resistance to high-temperature oxidation of these thermocouples make them suitable for measuring high temperatures.
Index Index H Hot junction A AgilentVEE 6 I 42 Impedance Installation C 5 1 C 41 C++ 41 Cold junction 6 Connection 1 L D M Delphi 41 DLLs 7 Driver routines 14 usb_tc08_close_unit 14, 21 usb_tc08_get_formatted_info 14, 26 usb_tc08_get_last_error 14, 27 usb_tc08_get_minimum_interval_ms 14, 24 usb_tc08_get_single 14, 31 usb_tc08_get_temp 14, 32 usb_tc08_get_temp_deskew 14 usb_tc08_get_unit_info 14, 25 usb_tc08_legacy_get_cold_junction 14, 37 usb_tc08_legacy_get_cycle 14, 40 usb_tc08_legacy_get_dr
48 TC-08 User's Guide U usb_tc08_close_unit 14, 21 usb_tc08_get_formatted_info 14, 26 usb_tc08_get_last_error 14, 27 usb_tc08_get_minimum_interval_ms 14, 24 usb_tc08_get_single 14, 31 usb_tc08_get_temp 14, 32 usb_tc08_get_temp_deskew 14 usb_tc08_get_unit_info 14, 25 usb_tc08_legacy_get_cold_junction 14, 37 usb_tc08_legacy_get_cycle 14, 40 usb_tc08_legacy_get_driver_version 14, 38 usb_tc08_legacy_get_temp 14, 36 usb_tc08_legacy_get_version 14, 39 usb_tc08_legacy_run 14, 34 usb_tc08_legacy_set_channel 14, 3
WARRANTY/DISCLAIMER OMEGA ENGINEERING, INC. warrants this unit to be free of defects in materials and workmanship for a period of 13 months from date of purchase. OMEGA’s WARRANTY adds an additional one (1) month grace period to the normal one (1) year product warranty to cover handling and shipping time. This ensures that OMEGA’s customers receive maximum coverage on each product. If the unit malfunctions, it must be returned to the factory for evaluation.
Where Do I Find Everything I Need for Process Measurement and Control? OMEGA…Of Course! Shop online at omega.