Appendix b calibration sample program, Appendix b, calibration sample program, Calibration sample program – National Instruments VXI-SC-1102 User Manual

Page 40: Sample program for calibration

Advertising
background image

©

National Instruments Corporation

B-1

VXI-SC-1102/B/C User Manual

Appendix

B

Calibration Sample Program

This chapter contains a sample program to help you calibrate your
submodule.

Sample Program for Calibration

The following sample C program will help you calibrate the
VXI-SC-1102/B/C submodules. The calibration constants are stored
only in NI-DAQ memory. You must enter the (input, output) voltage
pairs read by a DMM by hand. Before running the sample program
below, you must run the NI-DAQ Configuration Utility to configure the
VXI-SC chassis and to configure the DAQ device that will
communicate with the VXI-SC-1102/B/C.

The following sample program is written to work for a DAQ device,
such as the VXI-MIO-64E-1, with a 5 V full-scale input:

#include <stdio.h>

#include <math.h>

#include <dataacq.h>

#define MIO_FULL_SCALE

5.0

/* valid for VXI-MIO-64E-1 */

#define N_VXI_SC_SLOTS

24

#define NIDAQMEM

0

#define ALL

-1

int

enterInt (char *prompt)

{

short

ret;

int

value;

Advertising