Measurement Computing TempBook rev.3.0 User Manual
Page 5

TempBook User’s Manual,
11-14-00
iii
5 Programmer’s Guide
A Programmer’s View of TempBook Operations -------------------------------------------------------------------- 5-1
Driver Options ------------------------------------------------------------------------------------------------------------ 5-3
Standard API (tbk…)-------------------------------------------------------------------------------------------- 5-3
Enhanced API (daq…) ------------------------------------------------------------------------------------------ 5-3
Language Support ----------------------------------------------------------------------------------------------- 5-3
6 Standard API Programming of the TempBook With C
Accessing TempBook from a Windows Program -------------------------------------------------------------------- 6-1
Accessing TempBook from a C for Windows Program ------------------------------------------------------------- 6-1
High-Level Analog Input ------------------------------------------------------------------------------------------------ 6-1
Low-Level Analog Input ------------------------------------------------------------------------------------------------ 6-2
Analog Input in the Background---------------------------------------------------------------------------------------- 6-2
General Purpose Digital I/O Functions -------------------------------------------------------------------------------- 6-4
High-Speed Digital Input ------------------------------------------------------------------------------------------------ 6-4
Counter/Timer Functions ------------------------------------------------------------------------------------------------ 6-5
High-Level Thermocouple Data Acquisition ------------------------------------------------------------------------- 6-6
Thermocouple Linearization -------------------------------------------------------------------------------------------- 6-7
Sample Programs --------------------------------------------------------------------------------------------------------- 6-8
High-Level Analog Input --------------------------------------------------------------------------------------- 6-8
Low-Level Analog Input---------------------------------------------------------------------------------------- 6-9
Analog Input in the Background------------------------------------------------------------------------------ 6-10
General Purpose Digital I/O----------------------------------------------------------------------------------- 6-11
High-Speed Digital Input -------------------------------------------------------------------------------------- 6-12
Counter Timer Functions -------------------------------------------------------------------------------------- 6-13
High-Level Thermocouple Measurement ------------------------------------------------------------------- 6-14
Low-Level Thermocouple Linearization -------------------------------------------------------------------- 6-15
Command Summary, C Language (Windows) ---------------------------------------------------------------------- 6-17
7 Software Calibration and Zero Compensation
Software Calibration ----------------------------------------------------------------------------------------------------- 7-1
Initializing the Calibration Constants ------------------------------------------------------------------------- 7-1
Calibration Setup and Conversion----------------------------------------------------------------------------- 7-2
Calibration Example--------------------------------------------------------------------------------------------- 7-2
Zero Compensation------------------------------------------------------------------------------------------------------- 7-3
Zero Compensation Example ---------------------------------------------------------------------------------- 7-4
Automatic Zero Compensation -------------------------------------------------------------------------------- 7-5
8 Thermocouple Measurement
Low-Level Thermocouple Data Conversion Functions ------------------------------------------------------------- 8-1
High-Level Thermocouple Measurement Functions----------------------------------------------------------------- 8-3
Single-Channel Measurement (tbkRdTemp)--------------------------------------------------------------- 8-3
Multiple Measurements from a Single Channel (tbkRdTempN) ---------------------------------------- 8-4
Multiple Channel Measurement (tbkRdTempScan) ----------------------------------------------------- 8-4
Multiple Measurements from Multiple Channels (tbkRdTempScanN) ------------------------------- 8-4
9 tbkCommand Reference (Standard API)
Overview------------------------------------------------------------------------------------------------------------------- 9-1
Commands in Alphabetical Order -------------------------------------------------------------------------------------- 9-2
API Reference Tables --------------------------------------------------------------------------------------------------- 9-32
A/D Channel Descriptions------------------------------------------------------------------------------------- 9-32
A/D Gain Definitions------------------------------------------------------------------------------------------- 9-32
A/D Trigger Source Definitions ------------------------------------------------------------------------------ 9-32
Pretrigger Functions Trigger Source Definitions----------------------------------------------------------- 9-33
Thermocouple Types ------------------------------------------------------------------------------------------- 9-33
API Error Codes - C Languages ------------------------------------------------------------------------------ 9-33
API Error Codes - QuickBASIC------------------------------------------------------------------------------ 9-34
API Error Codes - Turbo Pascal ------------------------------------------------------------------------------ 9-35
API Error Codes - Visual Basic ------------------------------------------------------------------------------ 9-36