
Documentation Number UD128A8D4602 Manual Chapter 5 37
B&B Electronics Mfg Co – 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph 815-433-5100 - Fax 815-433-5104
B&B Electronics Ltd – Westlink Comm. Pk. – Oranmore, Galway, Ireland – Ph 353-91-792444 – Fax 353-91-792445
Chapter 5 -
UD PROGRAMMING WITH VISUAL BASIC
Introduction
The UD128A8D Data Acquisition Library provides access to the
hardware using the “B&B Electronics Data Acquisition Type Library
1.0” and Visual Basic Project References. Selection of the Library
enables functions for reading or writing data to the UD128A8D.
These functions are similar to those used with other devices.
The UD128A8D drivers make a collection of devices as found during
startup or connection, this collection is accessed through the
creation of global variables and objects. Provided functions include a
means to determine how many devices are connected, to select
which device is to be accessed, and to read or send data to any of
the connected devices. An event is generated when a device is
connected or disconnected. Your program must handle that event
and take appropriate action. One program at a time can access the
device collection using this version of the Library..
Devices connected can be addressed in the order in which they are
found {Device(1), Device(2), etc.} during startup or by the DAQ
name (“DAQ1”, “DAQ2”, etc.). If you plug in a new DAQ module, it is
added to the collection as the next DAQ name (“DAQ3”) and will
reserve and retain that name on that computer. If all of the devices
are disconnected, and the last module is reconnected, it will be the
first device found, Device(1), but could also be addressed by the
DAQ name (“DAQ3”). Methods are provided for either type of
module access.
The following sections covers the basics, then advanced access.
Description
The BBDaq Software Component provides an interface in Microsoft
Visual Basic to the UD128A8D. It may be expanded later to cover
other data acquisition devices with different functions.
Following is a description of the functions available using VB 6.0 for
compatibility with Windows OS versions 98 through XP.
Library Software Component Organization
(1) BDaq.BBDaqEnum
A BBDaqEnum is a collection of connected UD devices. You can
select a device from BBDaqEnum by name or reference. Connecting
or disconnecting a device causes an event that can trigger the
software to check connected devices and make appropriate
changes.
Commenti su questo manuale