Chapter 2
2.1
Programming
with the
Ueidaq
Framework
API
2.1.1
Creating a
Session
2.1.2
Configuring
the Channels
2.1.3
Configuring
the Timing
© Copyright 2009
United Electronic Industries, Inc.
Programming with the High-Level API
This section describes how to program the AO-308x family of boards
(AO-308, AO-308-350, AO-308-353, AO-308-420) using the UeiDaq
Framework High-Level API.
The UeiDaq Framework is object-oriented. Its objects can be
manipulated in the same manner within various development
environments, such as Visual C++, Visual Basic, or LabVIEW.
Although the following section focuses on the C++ API, the concept is the
same for any programming language you use.
Please refer to the "UeiDaq Framework User Manual" for more
information on using other programming languages.
Please refer to the examples that come with the UeiDaq Framework.
They contain detailed and commented code that can be compiled and
executed.
The Session object controls all operations on your PowerDNA device.
Therefore, the first task is to create a session object, by entering:
CUeiSession session;
Framework uses resource strings to select which device, subsystem,
and channels you use within a session. The resource string syntax is
similar to a web URL, as:
<device class>://<IP address>/<Device Id>/
<Subsystem><Channel list>
For PowerDNA, the device class is pdna.
For example, the following resource string selects analog output
channels 0,1 on device 1 at IP address 192.168.100.2: "pdna://
192.168.100.2/Dev1/Ao0:1"
// Configure channels 0,1 with an output
// range of ±40V
session.CreateAOChannel("pdna://192.168.100.2/
Dev0/ao0:1",-40.0, 40.0);
You can configure the AO-308-353 series boards to run either in simple
mode (point by point) or buffered mode (ACB mode).
In simple mode, the delay between samples is determined by software
on the host computer.
In buffered mode, the delay between samples is determined by the AO-
308-353 on-board clock.
Tel: 508-921-4600
www.ueidaq.com
Date: September 2010
Programming with the High-Level API
File:AO-308-353 Chap2.fm
Chapter 2
8
Vers: 1.4
Need help?
Do you have a question about the DNx-AO-308-353 and is the answer not in the manual?
Questions and answers