beautypg.com

Measurement Computing TempBook rev.3.0 User Manual

Page 50

background image

6-18 Standard API Programming of the TempBook with C

TempBook User’s Manual

Software Calibration and Zero Compensation Commands:

tbkReadCalFile (char *calfile)

Read the calibration constants text file

tbkCalSetup (uint nscan, uint readingsPos, uint

nReadings, uint chanType, uint chanGain, uint
bipolar, uint noOffset)

Specify scan information used by tbkCalConvert

tbkCalConvert (uint *counts, uint scans)

Perform software calibration on scan data

tbkCalSetupConvert (uint nscan, uint readingsPos,

uint nReadings, uint chanType, uint chanGain,
uint bipolar, uint noOffset, uint *counts, uint
scans)

Combined tbkCalSetup and tbkCalConvert

tbkZeroSetup (uint nscan, uint zeroPos, uint

readingsPos, uint nReadings)

Specify scan information used by tbkZeroConvert function

tbkZeroConvert (uint *counts, uint scans)

Perform zero compensation on scan data

tbkZeroSetupConvert (uint nscan, uint zeroPos,

uint readingsPos, uint nReadings, uint *counts,
uint scans)

Combined tbkZeroSetup and tbkZeroConvert

tbkConfCntr0 (uchar config)

Set the operating mode of the counter/timer

tbkWtCntr0 (uint cntr0)

Write a value to the counter/timer count down register

tbkRdCntr0 (uint _far *cntr0, uchar mode)

Read the counter/timer hold register

tbkRdBit (uchar bitNum, uchar *bitVal)

Read a specific digital input bit

tbkRdByte (uchar *byteVal)

Read all digital inputs

tbkWtBit (uchar bitNum, uchar bitVal)

Write to a specific digital output bit

tbkWtByte (uchar byteVal)

Write to all digital outputs

Pretrigger Operation Commands:

tbkSetTrigPreT (uchar source, uint channels, uint

level, uint preCount, uint postCount)

Setup the trigger source and level for a pretrigger operation

tbkRdNForePreT (uint _far *buf, uint count, uint

_far *retcount, uchar _far active)

Read multiple scans for a pretrigger operation in the foreground

tbkRdNForePreTWait (uint _far *buf, uint count,

uint _far *retcount)

Read multiple scans for a pretrigger operation in the foreground

continuing until the trigger event occurs

tbkRdNBackPreT (uint _far *buf, uint count, uchar

cycle)

Read multiple scans for a pretrigger operation in the background