Chapter 5
Calibration
©
National Instruments Corporation
5-39
VXI-SC-1102 User Manual
printf("Apply input voltage for point 1, channel %d, gain %.0f.\n"
moduleChan, gain);,
vInput1
= enterFloat ("Enter VXI-SC-1102 input voltage: ");
/* User enters vInput1. */
vOutput1 = enterFloat ("Enter VXI-SC-1102 output voltage: ");
/* User enters vOutput1. */
printf("Apply input voltage for point 2, channel %d, gain
%.0f.\n",moduleChan, gain);
vInput2
= enterFloat ("Enter VXI-SC-1102 input voltage: ");
/* User enters vInput2. */
vOutput2 = enterFloat ("Enter VXI-SC-1102 output voltage: ");
/* User enters vOutput2. */
binOutput1= vOutput1*scale;
binOutput2= vOutput2*scale;
/* Convert to DAQ board's format. */
SCXI_Cal_Constants (vxiChassisID, moduleSlot, moduleChan,
2, NIDAQMEM, dummyRangeCode, gain,
dummyDAQboard, dummyDAQchan, dummyDAQgain, 1,
vInput1, binOutput1, vInput2, binOutput2,
&binOffset, &gainerr);
/* Calculate offset & gain error. */
offset
= binOffset/scale;
/* Convert from DAQ board format. */
printf("Calculated offset %f V, gain ratio (actual/ideal) %f"
"and stored in NI-DAQ memory.\n\n", offset, gainerr);
}
}
}
01Title.book : 09Ch5.frm Page 39 Friday, March 21, 1997 3:40 PM