Chapter 5 Using the SCXI-1125
©
National Instruments Corporation
5-23
Perform Offset Null Compensation Using Traditional NI-DAQ (Legacy)
C API
After configuring the system settings and module properties, you
can perform an offset null compensation programmatically using
SCXI_Calibrate
.
SCXI_Calibrate
takes measurements and adjusts the
coarse and fine offset null potentiometers to minimize or eliminate any
electrical offset for a channel. Repeat this process for each channel by
calling the
SCXI_Calibrate
function in a loop. Use the resulting
imbalance in your application as a software correction factor by
determining the residual voltage from the imbalance, and subtracting this
residual offset from each future measurement. For more information
regarding the operation of
SCXI_Calibrate
, refer to the
Traditional
NI-DAQ (Legacy) Function Reference Help
installed by default in
Start»
Programs»National Instruments»NI-DAQ
.
Perform Acquisition Using Traditional NI-DAQ (Legacy) C API
There are several NI-DAQ functions you can use to take measurements.
Usually in SCXI the preference is to take multiple samples from multiple
channels using the
SCAN_Op
function.
SCAN_Op
performs a synchronous,
multiple-channel scanned data acquisition operation.
SCAN_Op
does not
return until Traditional NI-DAQ (Legacy) acquires all the data or an
acquisition error occurs (MIO, AI, and DSA devices only). For this reason,
it is sometimes useful to use
SCAN_Op
in conjunction with the function
Timeout_Config
, which establishes a timeout limit synchronous
functions to ensure that these functions eventually return control to your
application. After acquiring data using
SCAN_Op
, the resultant data is not
organized by channel, so you should demultiplex the data using
SCAN_Demux
.
SCAN_Demux
rearranges, or demultiplexes, data acquired by
a
SCAN_Op
into row-major order, meaning each row of the array holding
Table 5-8.
NI-DAQ Functions Used to Configure SCXI-1125
Channel
Setting
NI-DAQ Function to Use
Significant
Parameters
Possible Parameters
Values
Gain
SCXI_Set_Gain
f64 gain
(gain setting)
1, 2, 5, 10, 20, 50, 100,
200, 250, 500, 1000,
2000
Bandwidth
SCXI_Configure_Filter
f64 freq
(filter cutoff
frequency if
filterMode = 1)
4.0, 10,000.0 Hz