beautypg.com

Chapter 9 - tbkcommand reference (standard api), Overview, Tbkcommand reference (standard api) – Measurement Computing TempBook rev.3.0 User Manual

Page 61

background image

tbkCommand Reference (Standard API)

9

TempBook User’s Manual

tbkCommand Reference (Standard API) 9-1

Overview

The first part of this chapter describes the TemBook/66 driver commands (this is the Standard API and is
not to be confused with the Enhanced API). The first table lists the commands by their function types as
defined in the driver header files. Then, the prototype commands are described in alphabetical order as
indexed below. At the end of the chapter (beginning on page 9-32), several reference tables define
parameters for: A/D Channel Descriptions, A/D Gain Definitions, A/D Trigger Source Definitions, Pre-
Trigger Functions, Thermocouple Types, and the API Error Codes.

These TempBook software commands are described on the following pages:

Function

Description

Page

High- and Low-Level A/D Functions

tbkConfCntr0

Configure the counter 0 mode

9-5

tbkGetBackStat

Read the status of a background A/D transfer

9-6

tbkGetFreq

Read the current pacer clock frequency

9-6

tbkGetScan

Read the current scan configuration

9-7

tbkRd

Configure an A/D acquisition and read one sample from a channel

9-8

tbkRdCntr0

Read the current value of the counter 0

9-9

tbkRdFore

Read a single A/D sample and increment the channel mux

9-10

tbkRdN

Configure an A/D acquisition and read multiple scans from a channel

9-10

tbkRdNBack

Read count A/D scans in the background using interrupts

9-11

tbkRdNBackPreT

Reads multiple A/D scans, initiated by

tbkAdcSetrigPreT

command, in

the background

9-12

tbkRdNFore

Read count A/D samples in the foreground (polled mode)

9-12

tbkRdNForePreT

Read multiple A/D scans, initiated by

tbkAdcSetTrigPretT

command,

in the foreground

9-13

tbkRdNForePreTWait

Read multiple A/D scans, initiated by

tbkAdcSetTrigPretT

command,

in the foreground without returning until the acquisition completes

9-14

tbkRdScan

Configure an A/D acquisition and read one scan

9-14

tbkRdScanN

Configure an A/D acquisition and read multiple scans

9-15

tbkRdTemp

Take a single thermocouple reading from the given analog input channel

9-15

tbkRdTempN

Take multiple thermocouple readings from the given analog input channel

9-16

tbkSetMode

Configure gain amp single-/differential and polarity modes

9-21

tbkRdTempScan

Take thermocouple readings from analog input channels 'startChan'
through 'endChan"

9-17

tbkRdTempScanN

Take multiple thermocouple readings from analog input channels
'startChan' through 'endChan"

9-18

tbkSetClk

Set the pacer clock counters

9-20

tbkSetFreq

Configure the pacer clock frequency in Hz

9-21

tbkSetMux

Configure a scan specifying start and end channels

9-22

tbkSetScan

Configure up to 512 channels making up an A/D or HS digital input scan

9-24

tbkSetTrig

Configure an A/D trigger

9-25

tbkSetTrigPreT

Set the trigger of analog level triggering & initiates the collection of pre-
trigger data acquisition

9-26

tbkSoftTrig

Send a software trigger command to the TempBook

9-27

tbkStopBack

Stop a background A/D transfer

9-27

tbkWtCntr0

Write a value to counter 0

9-30

Digital I/O Functions

tbkRdBit

Read a bit on a digital input port

9-9

tbkRdByte

Read a byte from a digital input port

9-9

tbkWtBit

Program a bit on a digital output port

9-29

tbkWtByte

Output a byte to a digital output port

9-30

Thermocouple Functions

tbkTCConvert

Convert raw A/D readings to temperature readings

9-28

tbkTCSetup

Set up parameters for subsequent temperature conversions

9-28

tbkTCSetupConvert

Set up and convert raw A/D readings into temperature readings

9-29