Measurement LabVIEW VIs User Manual

TM
Measurement Computing
10 Commerce Way
Norton, MA 02766
(508) 946-5100
Fax: (508) 946-9500
info@mccdaq.com
www.mccdaq.com
DaqIO IRU1,LabVIEW
User’s Guide
Support VIs l
Requires LabVIEW
7.0 or Higher.
DaqIO IRU1,LabVIEW
Support VIs User’s Guide
p/n
471-0903 Rev. 1.0
TM
2 877894 DaqIO LabVIEW Support VIs User’s Guide
Contents
1. Initial Setup …… 5
2. Using the “How to” Examples …… 6
3. Connector Layout and Naming Convention ……7
4. How to Modify a VI …… 9
5. How to Start a VI from Scratch …… 11
6. How to Run Multiple Acquisitions …… 12
7. DaqIO LabVIEW Palette Layout …… 12
The DaqIO LabVIEW support VIs require LabVIEW 7.0 or greater.
DaqIO LabVIEW Support VIs User’s Guide 877894 3
This page is intentionally blank.
4 877894 DaqIO LabVIEW Support VIs User’s Guide

Initial Setup

Install Software
Place the Data Acquisition CD into the CD-ROM drive. Wait for PC to auto-run the CD. This may take a few moments, depending on your PC. If the CD does not auto-run, use the Desktop’s Start/Run/Browse feature and run the Setup.exe file. After the intro-screen appears, follow the screen prompts.
After selecting the hardware type, select Enhanced LabVIEW Support from the list of available software. The Default location is C:\Program Files\DaqIO LabView Support
Setup Hardware
Consult the manual for your specific device for hardware setup and configuration information. Note: Remember the name you assign to your device as it will be needed in a later step.
Add a DaqIO Pallet to an Existing Palette
1) Open a new blank LabView.vi
2) From the Tools menu item select: Advanced >> Edit palette views
3) In the “Edit Controls and Functions Palettes” dialog box select: “New Setup…” This is selected from the Palette view list box.
4) Enter a name for the New Palette View
5) Right mouse-click in an open space in the function palette; then select: insert >> submenu.
6) From the “Insert Submenu” dialog select: “Link to a directory”
7) Browse to and open the “C:\Program Files\DaqIO LabView Support” directory.
8) Click the “Select Curr Dir” button. The DaqIO submenu should appear in the function palette.
9) In the “Edit Controls and Functions Palettes” dialog box, click “Save Changes.”
Setting the Paths
In order to use the DaqIO LabVIEW support VI’s from any directory on your machine, the path to the DaqIO VI’s must be set. This is done as follows:
1) From the Tools menu Item select “Options”
2) In the Options Dialog box select “Paths.”
3) In the second dropdown select “VI Search Path.” Note that the Library Directory is the typical
default displayed.
4) In the test box above the “Insert After” Button, enter:
C:\Program Files\DaqIO LabVIEW Support\*
5) Finish by clicking the “OK” button.
DaqIO LabVIEW Support VIs User’s Guide 877894 5

Using the “How to” Examples

Examples for specific devices are located, by default, at:
C:\Program Files\DaqIO LabView Support\Howto and Example VI's
The directory has 4 sub-directories:
Daq Device Examples - For use with Daq Series Devices DBK Examples - For use with DBK Expansion Cards Wave Device Examples - For use with WaveBook Series Devices WBK Examples - For use with WBK expansion modules
The directory also includes a How To with two sub-directories: Daq Devices and Wave Devices. These sub-directories contain examples of how to perform specific operations
using the DaqIO VI's. Information is provided regarding digital and analog triggering, waveform output, and asynchronous digital IO along with other operations [that are included within the directory].
The Howto VI’s contain documented diagrams that explain functions and VI connections specific to each VI. Howto number 1 and number 2 show the basic steps and most common wiring connections needed for most VI’s. You should become familiar with these two VI’s before proceeding with the creation of your own programs.
The Howto VI’s contain generic device configuration VI’s. If you use a Howto VI as a basis for your own VI, then the generic Howto channel configuration VI’s should be replaced with channel configuration VI’s that are specific to your device type. This is necessary to access the full functionality of your device (see following figure).
Replacing a Generic “DAQ Howto” Analog Input VI with a Device Specific VI
6 877894 DaqIO LabVIEW Support VIs User’s Guide

Connector Layout and Naming Conventions

Standard Connections
Certain connections are common to the majority of VIs. These “standard connections” include:
Acquisition Number Device Name Error In and Out
Standard Connections
Acquisition Number: This connection exists as an input and output on nearly all VIs. It
is used to keep all the parts of an individual acquisition grouped together. Multip le acquisitions are, in general, only used when you have multiple main devices running at different acquisition rates triggered to scan at the same time. See Howto #11 for an example of multiple acquisitions.
Device Name: This connection is used to tie different sections of a device to its
functions. There are certain VIs that have the Device Name and Device Name Out connections available, although they are not utilized within the VI itself. The purpose of these ‘pass through’ connections is to make wiring easier and keep the VI diagram clean looking.
Error In and Out: Error In and Out connections are utilized to keep certain code from
executing, or to force the execution of code under certain circumstances. To avoid hard failures and un-initialized configuration problems, it is highly recommended that the Error In and Error Out ALWAYS be connected between applicable VIs.
DaqIO LabVIEW Support VIs User’s Guide 877894 7
Using Channel Names and Trigger Channel Names
Once configured, device channels are referred to by name. All device-configuration VIs contain string controls that allow you to enter a name for any given channel. If you choose not to enter a name a default name will be generated. The channel names are used by various VIs for functions, e.g., Digital Output, and Triggering.
Where applicable, you can select channel numbers to be used as trigger channels. When you select channels for triggering, the names of the associated channels are then available from the ‘Trigger Channel Names’ output connection. This connection can be wired directly into one of the triggering VIs.
Using Trigger Channel Names
Channel Names for Asynchronous and Other Operations
In the case of digital VIs the list of configured channel names is available at the “Channel Names Out” connection of the digital VIs. This string array can be wired to the “Digital Output Port Names” connection on the DaqIO Digital Asynchronous Write VI to facilitate writing data to the configured channels.
Using a Channel Name as an Input to the Digital Write VI
Channel Names can be used to start and stop timers, counters and analog outputs.
8 877894 DaqIO LabVIEW Support VIs User’s Guide

How to Modify a VI

All Channel configuration VI’s are similar in connector layout with inputs and outputs for Acquisition#, Device Name, and Errors. Inserting expansion VI’s is simply a matter of cutting the existing common connections, making room for the new sub VI, inserting the sub VI, and making new connections and controls for the sub VI.
Adding a Device
In this illustrated example we will be adding a DBK80 to the Howto #1 diagram (right-hand figure).
1) Delete existing connections (see figure).
2) Make space. After deleting the wires (connections):
(a) Place the mouse cursor between the DaqBook VI (DAQBOOK2000) and the basic trigger VI
(DAQIO BASIC TRIG).
(b) Press and hold the “Control Key,” and at the same time click and hold down the left mouse
button. Next move the mouse an inch or so to the left. Releasing the mouse button and control key will cause all items in the diagram to shift to the left
the same distance you moved the mouse.
3) Add a DBK Channel Configuration VI to the Diagram.
(a) Select the DaqIO Data Acquisition sub-menu from the Functions palette. (b) Navigate through the sub-menus as follows:
>> DaqDevice and DBK Configuration >> DBK Expansion >> Analog Input >> DBK80
(c) Select the DBK80 Channel Configuration VI and place it on the diagram.
4) Make Connections to the VI.
For Acquisition Number, Device Name and Error In and Out, make connections on both sides of the DBK80 Configuration VI.
5) Create the Control.
To complete adding the expansion (DBK80), right-click on the DBK80 Channels connection and select “Create Control.”
DaqIO LabVIEW Support VIs User’s Guide 877894 9
Adding Device Sections
Adding Digital channels to the VI diagram follows the preceding steps with the exception of where the Digital IO channel configuration VI is located. For Example if you wished to add Digital Inputs to the preceding diagram you would:
(a) Delete the existing wires either to the left or right of
the DBK80.
(b) Make space available to insert the Digital IO
configuration VI.
(c) Browse to the Digital Input Configuration VI
[specific to your device].
(d) Insert the new VI into the diagram. (e) Connect the wires. (f) Create the Digital Control.
Adding a Second Device
Adding a second device to a VI is very similar to adding a device section or DBK expansion. However, note that device names must be unique.
Using Device Names on Subsequent VI’s with Multiple Devices
When multiple devices exist, the device name parameter is passed to DBK expansion and device section VI’s to determine how the connections inter-relate and which main device is to be utilized in the case of more advanced triggering.
10 877894 DaqIO LabVIEW Support VIs User’s Guide

How to Start a VI from Scratch

With the exception of channel and device configuration VI’s, mandatory VI’s can be found under
Acquisition Setup and Control >> Acquisition Control Palette. The Howto #1 Simple Acquisition,
shows the minimum requirements for an acquisition [using DaqIO LabVIEW support VI’s].
Required VI’s for all VI’s for initialization and closure:
COMM INIT: Initializes the DaqIO LabVIEW support (Must be first) COMM CLOSE: Closes the DaqIO LabVIEW support and releases any resources utilized
(Must be last)
Required VI’s for synchronous operation:
SCAN CONFIG: Sets Scan rate and other scan specific parameters ACQ ARM: Depending on the trigger method can either immediately start a scan or wait
for a specific trigger condition to occur.
READ SCAN: Once the acquisition has commenced this will retrieve specified amount of
data from the acquisition buffer.
VI’s for Asynchronous operations:
With the exception of Digital IO, asynchronous operations will have and associated start and stop VI’s. The start, stop and update VI’s are universal for all configured voltage output channels. This is true, regardless of device type.
Digital IO VI’s will have only read and write VI’s.
Each of these VI’s has a “Channel Names” connection that must be wired to determine what channels the operation will be performed on.
Trigger VI’s:
A method of triggering the acquisition must be provided within your VI. The VI’s are separated into three groups simple, analog, and digital.
SIMPLE: Generally immediate trigger or TTL trigger starts with manual or scan count
based stops.
ANALOG: Uses individual analog channel voltages or values to start or stop and
acquisition.
DIGITAL: Uses the value of a digital port to start or stop an acquisition.
Advanced triggering can be accomplished by combining the above VI’s. See the various triggering examples in the “Howto” example section for details.
DaqIO LabVIEW Support VIs User’s Guide 877894 11

How to Run Multiple Acquisitions

If you desire to run multiple devices at different rates, or trigger the devices independent of each other, then you must use a multiple acquisition VI layout. Howto #11 Multiple Acquisition provides details. In the Howto example, an “Acquisition Stop” VI is used to allow the other acquisition to continue running in the event that one acquisition stops. When both acquisitions have completed “Acquisition Close” is called to release all resources.

DaqIO LabVIEW Palette Layout

| -- Acquisition Setup and Control VI's
| -- Acquisition Control
These VI’s perform initialization and control functions for DaqIO LabVIEW support, Asynchronous operations such as digital port read and write, voltage output adjustment, and timer adjustment VI’s can be found in this palette
| -- Advanced
Advanced level VI’s should not be altered without an understanding of DaqCOM
| -- Triggering
This palette contains simples and more advanced triggering VI’s
| -- Daq Device and DBK Configuration VI's
| -- Daq Device VI's
This palette contains the base channel configuration VI’s for the Daq series devices. Select the appropriate sub palette for the device type that you have.
| -- DBK Configuration VI's
This palette contains the channel configuration VI’s for DBK series expansion devices. It is separated by the type of DBK device.
12 877894 DaqIO LabVIEW Support VIs User’s Guide
| -- Howto and Example VI's
| -- Daq Device Examples
This palette contains example VI’s for Daq series devices
| -- DBK Examples
This palette contains example VI’s for DBK expansion devices
| -- Howto VI's
The Howto palette contains operation specific example VI’s. Triggering, reconfiguration, and asynchronous operations and other advanced examples are located in this palette. Select the appropriate sub palette for the device type that you have.
| -- PDQ Examples
This palette contains examples describing the utilization of a PDQ30 for use with a DaqBoard3000 or PersonalDaq3000 Series device.
| -- StrainBook Examples
This palette contains example VI’s for the StrainBook616
| -- Wave Device Examples
This palette contains the base channel configuration VI’s for the Daq series devices. Select the appropriate sub palette for the device type that you have.
| -- WBK Examples
This palette contains the channel configuration VI’s for WBK series expansion devices. It is separated by the type of WBK device.
| -- ZonicBook Examples
This palette contains example VI’s for the ZonicBook618
| -- StrainBook Configuration VI's
This palette contains the base channel configuration VI’s for the StrainBook device
| -- Utility VI's
This palette contains VI’s used to display channel information, read and write data files and separate analog and digital data types. See the associated Howto sections for the utilization of these VI’s
DaqIO LabVIEW Support VIs User’s Guide 877894 13
| -- Wave Device and WBK Configuration VI's
| -- Wave Device VI's
This palette contains the base channel configuration VI’s for the Wave series devices. Select the appropriate sub-palette for the device type that you have.
| -- WBK Configuration VI's
This palette contains the channel configuration VI’s for DBK series expansion devices. It is separated by the type of DBK device.
| -- ZonicBook Configuration VI's
This palette contains the base channel configuration VI’s for the ZonicBook618 device
14 877894 DaqIO LabVIEW Support VIs User’s Guide
Loading...