AMX AXP-AI8 ANALOG 8-INPUT BOARD User Manual Page 19

  • Download
  • Add to my manuals
  • Print
  • Page
    / 25
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 18
DNA/DNR-AI-217 Simultaneous Sampling Differential Analog Input Board
Chapter 2 15
Programming with the High Level API
Tel: 508-921-4600 www.ueidaq.com Vers: 4.5
Date: April 2013 DNx-AI-217 Chap2x.fm
© Copyright 2013
United Electronic Industries, Inc.
Chapter 2 Programming with the High Level API
This section describes how to control the DNx-AI-217 using the UeiDaq Frame-
work High Level API.
UeiDaq Framework is object oriented and its objects can be manipulated in the
same manner from different development environments such as Visual C++,
Visual Basic or LabVIEW.
The following section focuses on the C++ API, but the concept is the same no
m
atter what programming language you use.
Please refer to the “UeiDaq Framework User Manual” for more information on
use of othe
r programming languages.
2.1 Creating a
Session
CUeiSession aiSession;
The Session object controls all operations on your PowerDNx device. Therefore,
the first task is to create a session object:
2.2 Configuring
the Resource
String
UeiDaq Framework uses resource strings to select which device, subsystem
and channels to use within a session. The resource string syntax is similar to a
web URL:
<device class>://<IP address>/<Device Id>/<Subsystem><Channel list>
For PowerDNA and RACKtangle, the device class is pdna.
For example, the following resource string selects analog input lines 0,1,2,3 on
device 1 at IP address 192.168.100.2: “pdna://192.168.100.2/Dev1/Ai0:3” as a
range, or as a list “pdna://192.168.100.2/Dev1/Ai0,1,2,3”.
2.3 Configuring
the Input
This section will show you how to configure your input for voltage measurement,
thermocouple measurement, or RTD measurement.
2.3.1 Voltage
Measurement
The gain applied on each channel is specified by using low and high input limits.
For example, the AI-217 available gains are 1, 2, 4, 8, 16, 32, 64 and the
maximum input range is [-10V, +10V (gain = 1)].
To select the gain of 1, you need to specify input limits of [-10V, +10V]:
// create a session object for input
// Configure channels 0,1 to use a gain of 1 in differential mode
aiSession.CreateAIChannel(“pdna://192.168.100.2/Dev0/Ai0,1”,
-10.0, 10.0,
UeiAIChannelInputModeDifferential);
Page view 18
1 2 ... 14 15 16 17 18 19 20 21 22 23 24 25

Comments to this Manuals

No comments