National Instruments VXI-SC-1102 Stereo Amplifier User Manual


 
Appendix B Calibration Sample Program
©
National Instruments Corporation B-3 VXI-SC-1102/B/C User Manual
double
scale,
gain,
vInput1,
vOutput1,
vInput2,
vOutput2,
binOutput1,
binOutput2,
binOffset,
gainerr,
offset;
do
{
vxiChassisID = enterInt ("\nEnter chassis ID of the VXI-SC chassis:");
} while (vxiChassisID < 1);
do
{
moduleSlot = enterInt ("Enter slot of the VXI-SC-1102: ");
} while (moduleSlot < 1 || N_VXI_SC_SLOTS < moduleSlot);
do
{
commPath = enterInt ("Enter device number of the DAQ board"
"controlling the chassis: ");
} while (commPath < 0);
dummyDAQboard = commPath;
dummyDAQrange = MIO_FULL_SCALE / dummyDAQgain;
scale = pow(2.0, 12.0) * dummyDAQgain / 10;
/* factor for converting to format
of 12-bit bipolar DAQ board */
SCXI_Reset (vxiChassisID, moduleSlot);
SCXI_Single_Chan_Setup (vxiChassisID, moduleSlot, 0, dummyDAQboard);
/* This is necessary only so that
SCXI_Change_Chan won't return
an error. */
for (gain = 1; gain <= 100; gain = gain + 99)
{
SCXI_Set_Gain (vxiChassisID, moduleSlot, ALL, gain);
/* Set the gain on all channels. */
for (moduleChan = 0; moduleChan < 32; moduleChan++)