Справочник Пользователя для National Instruments 321645c-01
Chapter 2
Function Reference — SCXI_Cal_Constants
NI-DAQ FRM for PC Compatibles
2-328
©
National Instruments Corporation
use the endpoints of your expected input range as scaled1 and scaled2. Then you would be
specifically calibrating your expected input voltage range.
specifically calibrating your expected input voltage range.
If you are using an SCXI-1100, SCXI-1122, SCXI-1126, or SCXI-1141, you can perform a
one-point calibration to determine the binary offset; you can do this easily without external
hookups using the
one-point calibration to determine the binary offset; you can do this easily without external
hookups using the
SCXI_Calibrate_Setup
function to internally ground the amplifier.
Use the procedure above, skipping steps 6 and 7, and using opCode = 1 for the
SCXI_Cal_Constants
function.
If you are storing calibration constants in the SCXI-1122, SCXI-1126, or SCXI-1141
EEPROM, your binary offset and gain adjust factors must not exceed the ranges given in
the respective module user manuals. The constant format in the EEPROM does not allow
for larger constants. If your constants exceed these specifications, the function returns
badExtRefError. If this error occurs, you should make sure your SCXIgain, DAQgain, and
TBgain values are the actual settings you used to measure the volt/binary pairs, and you might
want to recalibrate your DAQ device, if applicable.
EEPROM, your binary offset and gain adjust factors must not exceed the ranges given in
the respective module user manuals. The constant format in the EEPROM does not allow
for larger constants. If your constants exceed these specifications, the function returns
badExtRefError. If this error occurs, you should make sure your SCXIgain, DAQgain, and
TBgain values are the actual settings you used to measure the volt/binary pairs, and you might
want to recalibrate your DAQ device, if applicable.
Analog Output Calibration
When you call
SCXI_AO_Write
to output a voltage or current to your SCXI-1124 module,
NI-DAQ uses the calibration constants loaded for the given module, channel, and output range
to scale the voltage or current value to the appropriate binary value to write to the output
channel. By default, NI-DAQ will load calibration constants into memory for the SCXI-1124
from the module EEPROM load area (see the
to scale the voltage or current value to the appropriate binary value to write to the output
channel. By default, NI-DAQ will load calibration constants into memory for the SCXI-1124
from the module EEPROM load area (see the
section for more
information).
You can recalibrate your SCXI-1124 module to create your own calibration constants using
the following procedure:
the following procedure:
1.
Use the
SCXI_AO_Write
function with opCode = 1. If you are calibrating a voltage
output range, pass the parameter binaryData = 0. If you are calibrating the 0 to 20 mA
current output range (rangeCode = 6), pass the parameter binaryData = 255.
current output range (rangeCode = 6), pass the parameter binaryData = 255.
2.
Measure the output voltage or current at the output channel with a voltmeter. This is your
first volt/binary pair: binary1 = 0 or 255 and volt1 is the voltage or current you measured
at the output.
first volt/binary pair: binary1 = 0 or 255 and volt1 is the voltage or current you measured
at the output.
3.
Use the
SCXI_AO_Write
function with opCode = 1 to write the binaryData = 4,095 to
the output DAC.
4.
Measure the output voltage or current at the output channel. This is your second
volt/binary pair: binary2 = 4,095 and volt2 is the voltage or current you measured at the
output.
volt/binary pair: binary2 = 4,095 and volt2 is the voltage or current you measured at the
output.
5.
Call
SCXI_Cal_Constants
with your voltage/binary pairs and opCode = 2. You can
EEPROM. It is best to use calibrationArea = 3 (user EEPROM area) as you are