National Instruments 321645c-01 Welding System User Manual


 
Chapter 2 Function Reference AI_Check
©
National Instruments Corporation 2-3 NI-DAQ FRM for PC Compatibles
AI_Check
Format
status = AI_Check (deviceNumber, readingAvailable, reading)
Purpose
Returns the status of the analog input circuitry and an analog input reading if one is available.
AI_Check is intended for use when A/D conversions are initiated by external pulses applied
at the EXTCONV* pin or, if you are using the E Series devices, at the pin selected through
the
Select_Signal function; see DAQ_Config for information on enabling external
conversions.
Parameters
Input
Output
Parameter Discussion
readingAvailable represents the status of the analog input circuitry.
1: NI-DAQ returns an A/D conversion result in reading.
0: No A/D conversion result is available.
reading is the integer in which NI-DAQ returns the 12-bit result of an A/D conversion. If the
device is configured for unipolar operation, reading ranges from 0 to 4,095. If the device is
configured for bipolar operation, reading ranges from –2,048 to +2,047. For devices with
16-bit ADCs, reading ranges from 0 to 65,535 in unipolar operation, and –32,768 to +32,767
in bipolar operation.
Note
C Programmers—readingAvailable and reading are pass-by-reference
parameters.
Name Type Description
deviceNumber i16 assigned by configuration utility
Name Type Description
readingAvailable i16 whether a reading is available
reading i16 integer result