beautypg.com

Using dbk card calibration files – Measurement Computing Data Acquisition Systems rev.10.4 User Manual

Page 30

background image

For x% = 0 To 3
ret& = VBdaqIOReadBit&(handle&, DiodtLocal8255&,_ Diodp8255CLow&,

0, 0, x%, bitVal&)

Print "The value on bit "; x%; " of digital port C : &H";_ Hex$(bitVal&)
Next x%

Using DBK Card Calibration Files

Software calibration functions are designed
to adjust Daq device readings to
compensate for gain and offset errors.
Calibration constants are calculated at the
factory by measuring the gain and offset
errors of a card at each programmable gain
setting. These constants are stored in a
calibration text file that can be read by a
program at runtime. This allows new
boards to be configured for calibration by
updating this calibration file rather than
recompiling the program. Calibration
constants and instructions are shipped with
the related DBK boards. Programs like
DaqView support this calibration and use
the same constants.

The calibration operation removes static
gain and offset errors that are inherent in
the hardware. The calibration constants
are measured at the factory and do not
change during the execution of a program.
These constants are different for each card
and programmable-gain setting; they may
even be different for each channel,
depending on the design of the expansion
card.

Note: DBK19 is shipped with calibration constants. Other cards use on-board potentiometers to perform hardware
calibration.

The calibration process has 3 steps:

Initialization consists of reading the calibration file.
Setup describes the characteristics of the data to be calibrated.
Conversion does the actual calibration of the data.

[MAIN]
32760,32769
32801,32750
32740,32777
32810,32768

[EXP3]
32780,32779
32800,32756
32768,32780
32750,32742

[EXP5]
32752,32764
32783,32757
32749,32767
32777,32730

Function prototypes, return error codes, and parameter definitions are located in the
DAQX.H header file for C (or similar files for other languages).

Cards that support the calibration functions are shipped with a diskette containing a
calibration constants file. The name of the file will be the serial number of the card
shipped with it. This file holds the calibration constants for each programmable-
gain setting of that card. These constants should be copied to a calibration text file
(DAQBOOK.CAL) located in the same directory as the program performing the
calibration.


To set up the calibration file, perform the following steps:

2-20 API Programming, General Models

988594

Programmer’s

Manual