
United Electronics Industries, Inc.
Tel: 781-821-2890
www.ueidaq.com
Fax: 781-821-2891
PowerDNA DIO-403 Layer -5-
2 Programming using the UeiDaq Framework
This section describes how to program the PowerDNA DIO-403 using the
UeiDaq’s framework API.
The 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 will focus on the C++ API but the concept stay the same no
matter what programming language you use.
Please refer to the “UeiDaq Framework User Manual” to get more information on
using other programming languages.
2.1 Creating a session
The Session object controls all operations on your PowerDNA device. Therefore,
the first task is to create a session object:
CUeiSession session;
2.2 Configuring the resource string
The 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, the device class is pdna.
For example, the following resource string selects digital input channels 0,1,2,3
on device 1 at IP address 192.168.100.2: "pdna://192.168.100.2/Dev1/Di0:3"
session.CreateDIChannel("pdna://192.168.100.2/Dev1/Di0:3");
2.3 Configuring the timing
You can configure the DIO-403 to run 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 DIO-403 on-
board clock.