DNx-AI-208 Analog Input Layer
Chapter 3
12
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.
Because the resistance can differ from channel to channel (current is flowing
through different channels of the same multiplexer which can have different
resistances), you should set up the channel number to be used. This function
returns the number of samples requested for averaging. Data is returned in raw
format.
•
DqAdv208MeasureParams
This function is used to measure a variety of AI-208 front-end
parameters (see channel equivalent diagram):
VrefReference voltage, Volts
VexcExcitation voltage, Volts
VsVmeas for Rs, Volts
RsSwitch resistance, Ohms
VxVmeas for Rx, Volts
RxMux resistance, Ohms
VaVmeas for Ra, Volts
RaResistance of shunt resistor Ra (plus 5k constant!), Ohms
VbVmeas for Rb, Volts
RbResistance of shunt resistor Rb (plus 5k constant!), Ohms
Before the function can measure these parameters, specify the
measurement conditions:
ChannelChannel being used for measurements
ExcAExcitation level A (even channels, 16 bit)
ExcBExcitation level B (odd channels, 16 bit)
RaShunt A level (8 bit, 256 positions from 0 to 200k)
RbShunt B level (8 bit, 256 positions from 0 to 200k)
The AI-208 layer has a 14-bit excitation DAC and an 8-bit shunt
calibration digital potentiometer. The digital potentiometer has a ±30%
initial resistance accuracy, 60-150 Ohm runner resistance, and a
35ppm temperature coefficient. Thus, measuring this resistor is crucial
for shunt calibration. An additional series resistor (4.99k 0.01%) is
inserted in the shunt calibration circuit to ensure precise measurement.
3.4
Using Layer
in ACB Mode
This is a pseudo-code example that highlights the sequence of functions needed
to use ACB on the AI-208 layer. A complete example with error checking can be
found in the directory SampleACB208.
#include "PDNA.h"
// unit configuration word
#define CFG208 (DQ_LN_ENABLED \
|DQ_LN_ACTIVE \
|DQ_LN_CLCKSRC0 \
|DQ_LN_RAW32)
uint32 Config = CFG208;
STEP 1:
Start DQE engine.
#ifndef _WIN32
DqInitDAQLib();
#endif