0% found this document useful (0 votes)
9 views

IOtech LabVIEW VIs

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

IOtech LabVIEW VIs

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

IOtech® LabVIEWTM Substitution VIs

TM
A Guide to using Virtual Instruments in LabVIEW for DaqBoard/2000 Series Boards

the smart approach to instrumentation ™

IOtech, Inc.
25971 Cannon Road
Cleveland, OH 44146-1833
Phone: (440) 439-4091
Fax: (440) 439-4093
E-mail (Product Information): [email protected]
E-mail (Technical Support): [email protected]
Internet: www.iotech.com

471-0902, rev 1.0

IOtech LabVIEW Substitution VIs Released per EO# 2045R2 02-26-01


Copyright, Trademark, and Licensing Notice
All IOtech documentation, software, and hardware are copyright with all rights reserved. No part of this product may be
copied, reproduced or transmitted by any mechanical, photographic, electronic, or other method without IOtech’s prior
written consent. IOtech product names are trademarked; other product names, as applicable, are trademarks of their
respective holders. All supplied IOtech software (including miscellaneous support files, drivers, and sample programs)
may only be used on one installation. You may make archival backup copies.
LabVIEWTM and NI-DAQTM are trademarks of National InstrumentsTM Corporation.

2 02-26-01 IOtech LabVIEW Substitution VIs


Foreword
This document serves as a supplement to both DaqBoard/2000 Series and LabVIEW
documentation. It is intended for individuals who:
• Want to convert LabVIEW VIs so they may be used with IOtech
Daqboard/2000 Series boards.
• Are familiar with LabVIEW VIs and would like to create new VIs for use
with IOtech Daqboard/2000 Series boards.

Note: IOtech LabVIEW Substitution VIs can be used to replace NI-DAQTM VIs. They
provide a means of using IOtech DaqBoard/2000 Series boards with LabVIEW
programs, while maintaining the NI-DAQ look and feel.

IOtech LabVIEW Substitution VIs are compatible with LabVIEW versions 5.1 and
higher. There are no special system requirements for using the substitution VIs, other
than those specified for the version of LabVIEW used.
LabVIEW support is provided for basic Analog Input, Analog Output, Digital IO, and
Counter Functions. Each includes program examples that can be modified, or used as is.

Contents

1 – Installation …… 5

2 – Using IOtech LabVIEW Substitution VIs …… 7

3 – Issues and Caveats …… 11

IOtech LabVIEW Substitution VIs 02-26-01 3


4 02-26-01 IOtech LabVIEW Substitution VIs
Installation 1

IOtech LabVIEW Substitution VIs are included on the IOtech Data Acquisition CD,
versions 2.4 and higher. The following steps take into account that you have previously
installed a DaqBoard/2000 Series board and 32-bit DaqBook/DaqBoard Support. If this
is not the case, install your DaqBoard support software and your DaqBoard/2000 Series
board according to one of the following documents. The first two documents are
available on our website, www.iotech.com.
• DaqBoard/2000 Series Installation Guide (1033-0940, rev 3.0 or higher)
• DaqBoard/2000 Series Users Manual (1033-0901, rev. 2.0 or higher)
• DaqBoard/2000 Compact PCI Documentation

Complete the following steps to successfully launch and run the installation program.
1. Place the Data Acquisition Software CD in the host PC’s CD-ROM drive. Wait for
PC to auto-access the CD. This may take a few moments, depending on your PC.
2. After the Data Acquisition Software Master Setup screen appears, select
32-Bit DaqBook/DaqBoard Support.
3. Select LabView Drivers.

Master Setup Screen

4. Click “Start Install.” A Select VIs to Install screen will appear.


See following figure.

IOtech LabVIEW Substitution VIs 02-26-01 5


“Select VIs to Install” Screen

5. Refer to the above figure. On the Select VIs to Install screen, select
Low-Level Substitution VIs (DaqBoard/2000 Series Only).
6. Click Next.
The software is now installed to a sub-directory named IOtech Data Acquisition.
This sub-directory is located within the LabVIEW directory. A shortcut, located
under DaqXSoftware, can be reached via the Windows Start Menu.
7. When the install is complete, review the Readme file. This file contains important
information that may not be available elsewhere. After reviewing the Readme file,
exit the program.

6 02-26-01 IOtech LabVIEW Substitution VIs


Using IOtech LabVIEW Substitution VIs 2
Overview
The IOtech Data Acquisition sub-directory contains folders for the various types of Virtual Instruments.
Each folder contains pertinent sample programs. The folders are designated:
• Analog Input
• Analog Output
• Counter
• Digital IO

In addition to these four VI folders, the sub-directory also contains a Documentation folder. The folders
can be accessed from the Windows Start Menu, under the LabVIEW directory (located under
DaqXSoftware).
IOtech LabVIEW Substitution VIs were designed to emulate National Instruments VIs. The substitutions
can be made in applications where an IOtech DaqBoard/2000 Series board is being used to replace a
NI-DAQ “E” Series device, a PC-LPM-16, or an AT-MIO-16 “H” or “L” Series board; however, for the
AT-MIO-16 L, the x500 gain-setting will not be supported. NI devices can typically be replaced with little
effort. An example follows shortly.

Supported VIs
Easy VIs Intermediate VIs Advanced VIs
AI Sample Channel AI Clear AI Buffer Config
AI Sample Channels AI Config AI Buffer Read
AI Acquire Waveform AI Continuous Scan AI Clock Config
AI Acquire Waveforms AI Read One Scan AI Control
AO Update Channel AI Read AI Group Config
AO Update Channels AI Single Scan AI Hardware Config
AO Generate Waveform AI Start AI Parameter

AO Generate Waveforms AI Waveform Scan AI SingleScan

Read from Digital Line AO Clear AI Trigger Config

Read from Digital Port AO Config AO Buffer Config

Write to Digital Line AO Continuous Gen AO Buffer Write

Write to Digital Port AO Start AO Clock Config

Count Events or Time AO Wait AO Control

Measure Pulse Width or Period AO Waveform Gen AO Group Config

AO Write One Update AO Hardware Config

AO Write AO Parameter

DIO Clear AO Single Update

DIO Config AO Trigger and Gate Config

DIO Read Digital Buffer Config

DIO Single Read_Write Digital Buffer Control

DIO Start Digital Buffer Read

DIO Wait Digital Clock Config

DIO Write Digital Group Config

Adjacent Counters Digital Single Read

Counter Read Digital Single Write

Counter Start Digital Trigger Config

Counter Stop DIO Port Config

Event or Time Counter Config DIO Port Read

Pulse Width or Period Meas Config DIO Port Write

Wait+ (ms) CTR Control


CTR Group Config
CTR Hardware Config
CTR Mode Config
Channel To Index

IOtech LabVIEW Substitution VIs 02-26-01 7


An “IOtech LabVIEW Substitution VIs” Walk-Through
In this walk-through we will use IOtech LabVIEW Substitution VIs to modify the National Instruments
Cont Acq&Chart (buffered).vi. The Cont Acq&Chart (buffered).vi example can be accessed via the
LabVIEW Help menu under the “Search Examples-Data Acquisition(Daq) Analog Input” sub-heading.

If you intend to use both National InstrumentsTM Hardware and IOtech DaqBoards, we
recommend that you create a new folder in which to keep your converted VIs.

1. Pull-down the File menu.


2. Select “Save With Options.”
3. Refer to the following figure. Select “Custom Save.” This will allow you to make the IOtech
LabVIEW Substitution VIs while keeping the National Instrument VIs.
4. In the “Selected Options” section of screen, choose the options as indicated in the following figure.
These are:
• To new location – single prompt
• Save entire hierarchy
• Include vi.lib files
• Include external subroutines
• Include run-time menus
• No password change

Performing a Custom Save of Cont Acq&Chart (buffered).vi

5. Click “Save” and create a new folder in which to keep your IOtech LabVIEW Substitution VIs.
6. Close the National Instruments example.
7. Open the Cont Acq&Chart (buffered).vi version you just saved from the location chosen in step 5.
8. Look at the Virtual Instruments Diagram for Cont Acq&Chart (buffered). See following figure.

8 02-26-01 IOtech LabVIEW Substitution VIs


Replacing the VIs within the Cont Acq&Chart (buffered).vi Diagram

In this example there are four hardware-related items that need replaced,
• AI Config
• AI Start
• AI Read
• AI Clear

Two other Virtual Instruments, My Data Proc and the Error handler have no
associated IOtech LabVIEW Substitution VI, as they do not directly pertain to
hardware. My Data Proc and the Error handler, should not be altered.

For the following steps, refer to the above figure as needed.


1. Right-click on AI Config. A list of options appears.
2. Move the mouse-pointer over the Replace option. The Functions Palette will appear.
3. Move the mouse-pointer over the IOtech Data Acquisition Button --
The IOtech Data Acquisition Palette will appear.
4. Move the mouse-pointer over IOtech’s “AI” button -- The Analog Input function palette will appear.
5. Click the IOtech AI Config.vi.
IOtech LabVIEW Substitution VI now replaces the original AI Config.vi.
Note: When the mouse-pointer moves over the IOtech AI Config VI, the Analog Input function pallet’s title
bar will show IO_AI Config.vi. The names of some high-level and low-level VIs look very similar.
When replacing VIs, the proper IOtech LabVIEW Substitution VI can be recognized by the
following naming convention:
“IO_” will be appended to the beginning of the original LabVIEW VI name. In this example
AI Config.vi is replaced with IO_AI Config.vi.

IOtech LabVIEW Substitution VIs 02-26-01 9


6. Right-click on AI Start; then repeat steps 2 through 4. At what would be step 5, select AI Start.

7. Right-click on AI Read; then repeat steps 2 through 4. At what would be step 5, select AI Read.

8. Right-click on AI Clear; then repeat steps 2 through 4. At what would be step 5, select AI Clear.

Testing, Debugging, and Saving the New Application


Testing
You should always verify that your Virtual Instruments function as you expect them to. For example, if you
modified an Analog Input VI, you should connect a known signal to the inputs and verify functionality. If
you modified an Analog Output VI you should use an oscilloscope, or meter, to verify the actual output.

Debugging your Application


If testing your application shows that it does not function properly, debug the application as follows:
1. Using the IOtech Control Panel Applet, verify that the DaqBoard/2000 Series board has been properly
installed and configured. Correct installation and configuration issues as applicable.
2. Physically check all hardware connections. Correct improper connections.
3. Determine if LabVIEW is communicating with the DaqBoard/2000 device.
(a) Go to the LabVIEW Directory.
(b) Go to the IOtech Data Acquisitions Functions Palette.
(c) Open and Run the IOtech LabVIEW Substitution VI named “Install Test.”
(d) Open and Run the “Install Test” VI.
Running Install Test generates a list of every DaqBoard/2000 Series board that is located in your PC.
You can run a communications test on a specific board. If the test does not pass, contact product
support. Chapter 3 includes contact information. If the test does pass, proceed to step 4.
4. Run one of the example programs to ensure that LabVIEW and the DaqBoard/2000 Series Board are
communicating properly.
If you cannot resolve the problem, review Chapter 3, Issues and Caveats. If the problem still can’t be
resolved, seek customer assistance. Note that chapter 3 includes contact information for product support.

Saving your Application


Save your application using LabVIEW’s standard save procedure. If you are using both IOtech and
National Instrument devices it is a good idea to save your VIs in separate folders.

10 02-26-01 IOtech LabVIEW Substitution VIs


Issues and Caveats 3

Since there are fundamental differences between IOtech and National Instruments board architectures, some
of the features available on DaqBoard/2000 Series boards are not implemented in the IOtech LabVIEW
Substitution VIs. It should also be noted that certain features available in National Instruments boards are
not implemented with the substitution VIs due to hardware issues.

Intended Use - IOtech LabVIEW Substitution VIs are intended for LabVIEW users who are replacing
one of the following devices with an IOtech DaqBoard/2000 Series board.
• National Instruments “E” series board
• PC-LPM-16
• AT-MIO-16 “H” and “L” series boards, with this exception, IOtech LabVIEW Substitution VIs
do not support the x500 gain-setting on the AT-MIO-16 L board.

If you need to access the full functionality of DaqBoard/2000 Series boards, the IOtech
LabVIEW API VIs must be used.

DSP – Some of the Low Level NI-DAQ VIs reference DSP handles to buffers. The DSP handle
functionality is automatic in the DaqBoard/2000 Series and the VI DSP handles are simply ignored.
Any VIs that are dependant on reading from or writing to a buffer [using either a DSP handle or a buffer
offset] will not function properly when replaced.
Trigger Types – Attempting to use a trigger type that is not supported will result in error 10083. Refer to
DaqBoard/2000 Series documentation for a list of valid trigger types.
Analog Input Range Settings – It is often the case that IOtech and National Instruments devices have
different range and gain settings. Gain selection for DaqBoard/2000 Series boards is automatic and is based
on the user-selected voltage limits.
Analog Output – Live update of an output buffer is not supported. If an output buffer needs to be
changed, then the output must be stopped, changed, and restarted.
Counters and Timers – Low-speed frequency measurement and signal timing can be accomplished with
the examples located under the IOtech CTR VI Palette. The support of this section is restricted to event
counting in 16-bit and 32-bit counter lengths. Frequency measurements can be made using event counting
within a known time frame. See the “Measure Frequency.vi” within the IOtech CTR Palette under
examples.
The CTR example VIs are NOT exact replacements for NI-DAQ VIs and will require program
modification if they are to be used. You can run the examples to determine application
suitability.

Pulse and Square Wave Generation – Pulse and square wave generation are limited with the IOtech
DaqBoard/2000 Series boards. Square wave generation can be accomplished with the example square wave
generation VI located under Digital IO.

The square wave generation VI example is NOT an exact replacement for NI-DAQ VIs and
will require program modification if it is to be used. You can run the example to determine
suitability for you application.

Analog Output VIs can provide functionality for applications that make use of one-shot pulse
or square waves with asymmetrical duty cycles.

IOtech LabVIEW Substitution VIs 02-26-01 11


Questions and Answers

Q: Who should I contact if I have questions that are not answered by my documentation?
A: If you believe you are having a problem with IOtech LabVIEW Substitution VIs or IOtech Hardware,
contact IOtech. Contact information is provided at the end of this chapter.
Q: What is meant by “IOtech LabVIEW Substitution VI”?
A: IOtech has developed a series of the VIs that emulate the NI-DAQ VIs. These IOtech VIs are referred
to as IOtech LabVIEW Substitution VIs.
Q: How do I install VIs?
A: Refer to chapter 1 of this document for installation instructions.
Q: Where is IOtech LabVIEW Substitution VIs support located, after installation?
A: Substitution VIs can be accessed through the LabVIEW Function Palette. The physical location within
the drive will be: ..C:\…\LabView\IOtech Data Acquisition.
Q: What version(s) of LabVIEW do I need to have?
A: IOtech LabVIEW Substitution VIs are supported by LabVIEW versions 5.1 and higher.
Q: What operating systems are supported?
A: IOtech LabVIEW Substitution VIs are supported by Windows 9x, ME, NT and 2000.
Q: Are there any examples on how to use IOtech LabVIEW Substitution VIs? If so, where are they?
A: Program examples exist for each function. They are located in the sub-palette, or sub-directory, below
the major function. For example: IOtech Data Acquisition\Analog Input\Examples)
Q: Can I use both IOtech and NI devices?
A: You may use IOtech and National Instruments boards in the same machine and even within the same
program as long as (1) the IOtech LabVIEW Substitution VIs are used to control IOtech boards, and (2)
the NI-DAQ VIs are used to control the National Instruments boards. You cannot mix VIs.
Q: Can I use boards other than those manufactured by IOtech and National Instruments, providing these
devices have LabVIEW support?
A: Yes, but you will need to use NI compatible virtual instruments that were developed for those specific
devices, providing those VIs exist.
Q: What do I have to do to my existing LabVIEW application to make it work?
A: If you have an existing National Instruments board-based test system, and you want to convert it for use
with An IOtech DaqBoard/2000 Series board, you must replace all the NI-DAQ Device Specific VIs
with the corresponding IOtech LabVIEW Substitution VIs.
Q: Can I use the IOtech LabVIEW Substitution VIs with National Instruments examples, or with higher
level VIs?
A: Yes, refer to the examples.
Q: How do I determine that a VI substitution operation was successful?
A: Test the modified application using known input and output values.
Q: Will using IOtech LabVIEW Substitution VIs change the performance of my LabVIEW application?
A: Under most circumstances, no. The IOtech LabVIEW Substitution VIs do not introduce any additional
processor overhead. If you must have absolute peak performance consider using the IOtech API
LabVIEW VIs. Note that these are stand-alone VIs that cannot be used with the substitution VIs.

12 02-26-01 IOtech LabVIEW Substitution VIs


Customer Assistance
To report problems and receive support, call or e-mail our Applications department, or visit our web site.
When you contact us, please provide the following information so support personnel can help you most
efficiently:

• Hardware model numbers and software version numbers.


• Operating system, type of computer, and device information in the Windows control panel
• Results of tests, such as the Daq* Configuration control panel.
• Hardware setup and software configuration.
• Information on input and/or output signals, as applicable.
• The replacement steps you performed, e.g., what VIs did you replace and what were the
before and after results.

All equipment returned to the manufacturer must have an RMA (Return Material Authorization) number.
You can obtain an RMA number by calling the Customer Service or Applications departments. When
returning the equipment, use the original shipping container (or equivalent) to prevent damage. Put the
RMA number on your shipping label to ensure that your shipment will be handled properly. After receiving
your equipment, we will fax a confirmation form that summarizes the charges (if applicable) and expected
return date.

IOtech can be reached by one of the following means:

Phone: (440) 439-4091

Fax: (440) 439-4093

E-mail (Product Information/Sales): [email protected]

E-mail (Technical Support): [email protected]

Internet: http//:www.iotech.com

Mail: IOtech, Inc. z 25971 Cannon Road z Cleveland, Ohio 44146-1833

IOtech LabVIEW Substitution VIs 02-26-01 13


14 02-26-01 IOtech LabVIEW Substitution VIs

You might also like