DNx-AI-208 Analog Input Layer
Chapter 3
11
Programming with the Low-Level API
Tel: 508-921-4600
www.ueidaq.com
Vers:
4.6
Date: November 2013
File:
AI208 Chap3.fm
© Copyright 2009
United Electronic Industries, Inc.
Therefore, you cannot call this function when the layer is involved in
any streaming or data mapping operations.
If you specify a short timeout delay, this function can time out when
called for the first time because it is executed as a pending command,
and layer programming takes up to 10ms.
Once this function is called, the layer continuously acquires data and
every “next call” function returns the latest acquired data
If you would like to cancel ongoing sampling, call the same function
with 0xFFFFFFFF as a channel number.
•
DqAdv208SetControl
This function allows you to set up different internal parameters. The
following sub-functions are available:
DQL_IOCTL208_SET_Ra
: set value for shunt calibration resistor
A in 256 steps (P+ to S+)
DQL_IOCTL208_SET_Rb
: set value for shunt calibration resistor
B in 256 steps (S+ to P-).
DQL_IOCTL208_SET_EXC_A
: set excitation DAC A.
DQL_IOCTL208_SET_EXC_B
: set excitation DAC B.
DQL_IOCTL208_SET_EXC_CH
: switch excitation channels on
or off.
•
DqAdv208SetExcVoltage
Set excitation voltage for excitation sources A and B and measure it
back using specified channels. The AI-208 layer is capable of providing
two sources of excitation voltage — Excitation A is connected to even
channels and B is connected to odd channels. Excitation voltage can
be selected and set at any level from 1.5V to 10V. This function sets up
excitation voltage as close as possible to the requested level and reads
it back from the selected channels. The user can select either channels
0x10 through 0x17 to read the excitation voltage from the
Px+
terminal
(four-wire connection), or channels 0x20 through 0x27 to read the
excitation voltage from PSx
+
terminals (six-wire connection). All
readings are performed relative to AGND. The user has to use the
read-back excitation voltage from the terminal because of DACs; there
is a voltage drop in the strain gauge leads and DAQ output quantization
error amounts to 1/1024 of the range.
Note that this function must be called before starting data acquisition or
reading channels in order to set up the proper excitation voltage source
before gathering data.
•
DqAdv208ReadChannel
This function performs “raw” measurements of the following values:
0x0 .0x27:
DQL_IOCTL208_READ_AGND
: connect both differential inputs of the PGA to
analog ground.
DQL_IOCTL208_READ_REF
: read 2.5V voltage reference
DQL_IOCTL208_READ_Rs
: measure switch resistance Rs
DQL_IOCTL208_READ_Rx
: measure multiplexer resistance
DQL_IOCTL208_READ_Ra
: measure shunt resistor Ra
DQL_IOCTL208_READ_Rb
: measure shunt resistor Rb
DQL_IOCTL208_READ_SS
: measure S+ to S-
DQL_IOCTL208_READ_PP
: measure P+ to AGND
DQL_IOCTL208_READ_PS
: measure PS+ to AGND