Universal Library
for
LabVIEW™
User’s Guide
Document Revision 9, March, 2007
Copyright 2007, Measurement Computing Corporation
3
Your new Measurement Computing product comes with a fantastic extra —
Management committed to your satisfaction!
Refer to www.mccdaq.com/execteam.html for the names, titles, and contact information of each key executive at
Measurement Computing.
Thank you for choosing a Measurement Computing product—and congratulations! You own the finest, and you can now
enjoy the protection of the most comprehensive warranties and unmatched phone tech support. It’s the embodiment of our
mission:
To provide PC-based data acquisition hardware and software that will save time and save money.
Simple installations minimize the time between setting up your system and actually making measurements. We offer quick
and simple access to outstanding live FREE technical support to help integrate MCC products into a DAQ system.
Lifetime warranty: Every hardware product manufactured by Measurement Computing Corporation is warranted
against defects in materials or workmanship for the life of the product. Products found defective are repaired or replaced
promptly.
Lifetime Harsh Environment Warranty®: We will replace any product manufactured by Measurement Computing
Corporation that is damaged (even due to misuse) for only 50% of the current list price. I/O boards face some tough
operating conditions, some more severe than the boards are designed to withstand. When a board becomes damaged, just
return the unit with an order for its replacement at only 50% of the current list price. We don’t need to profit from your
misfortune. By the way, we honor this warranty for any manufacturer’s board that we have a replacement for.
30 Day Money Back Guarantee: You may return any Measurement Computing Corporation product within 30 days
of purchase for a full refund of the price paid for the product being returned. If you are not satisfied, or chose the wrong
product by mistake, you do not have to keep it. Please call for an RMA number first. No credits or returns accepted
without a copy of the original invoice. Some software products are subject to a repackaging fee.
These warranties are in lieu of all other warranties, expressed or implied, including any implied warranty of
merchantability or fitness for a particular application. The remedies provided herein are the buyer’s sole and exclusive
remedies. Neither Measurement Computing Corporation, nor its employees shall be liable for any direct or indirect,
special, incidental or consequential damage arising from the use of its products, even if Measurement Computing
Corporation has been notified in advance of the possibility of such damages.
Universal Library for LabVIEW™ User's Guide
4
Trademark and Copyright Information
TracerDAQ, Universal Library, Harsh Environment Warranty, Measurement Computing Corporation, and the
Measurement Computing logo are either trademarks or registered trademarks of Measurement Computing Corporation.
Windows, Microsoft, and Visual Studio are either trademarks or registered trademarks of Microsoft Corporation
LabVIEW is a trademark of National Instruments.
CompactFlash is a registered trademark of SanDisk Corporation.
XBee and XBee-PRO are trademarks of MaxStream, Inc.
All other trademarks are the property of their respective owners.
Information furnished by Measurement Computing Corporation is believed to be accurate and reliable. However, no
responsibility is assumed by Measurement Computing Corporation neither for its use; nor for any infringements of patents
or other rights of third parties, which may result from its use. No license is granted by implication or otherwise under any
patent or copyrights of Measurement Computing Corporation.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form
by any means, electronic, mechanical, by photocopying, recording, or otherwise without the prior written permission of
Measurement Computing Corporation.
Notice
Measurement Computing Corporation does not authorize any Measurement Computing Corporation product
for use in life support systems and/or devices without prior written consent from Measurement Computing
Corporation. Life support devices/systems are devices or systems which, a) are intended for surgical
implantation into the body, or b) support or sustain life and whose failure to perform can be reasonably
expected to result in injury. Measurement Computing Corporation products are not designed with the
components required, and are not subject to the testing required to ensure a level of reliability suitable for the
treatment and diagnosis of people.
5
Table of Contents
Introducing the Universal Library for LabVIEW™ ............................................7
Installing and Configuring UL for LabVIEW......................................................8
Installing the software ........................................................................................................................8
Configuring your MCC hardware for use with UL for LabVIEW VIs ...................................................8
Overview of the Universal Library VIs...............................................................9
Analog I/O VIs....................................................................................................................................9
Signal conditioning VIs.....................................................................................................................10
Counter VIs......................................................................................................................................11
Digital I/O VIs...................................................................................................................................12
Streamer file VIs ..............................................................................................................................12
Memory board VIs ...........................................................................................................................13
Miscellaneous VIs............................................................................................................................13
How to use the LabVIEW Extensions (VIs) .....................................................15
Using the Library with LabVIEW ......................................................................................................15
UL function contexts: foreground (__Fg) and background (__Bg) ...............................................16
UL Extension VI example programs ................................................................................................16
Universal Library Virtual Instruments (VIs).....................................................18
Analog Input VIs ..............................................................................................................................18
AIn.VI ...........................................................................................................................................18
AInScBg.VI...................................................................................................................................20
AInScFg.VI...................................................................................................................................22
APretrBg.VI ..................................................................................................................................24
APretrFg.VI ..................................................................................................................................26
ATrigger.VI...................................................................................................................................28
ALoadQue.VI ...............................................................................................................................29
OptAIn.VI .....................................................................................................................................30
SetTrig.VI .....................................................................................................................................33
TIn.VI ...........................................................................................................................................35
TInScan.VI ...................................................................................................................................37
Analog Output VIs............................................................................................................................39
AOut.VI ........................................................................................................................................39
AOutScFg.VI ................................................................................................................................40
AOutScBg.VI................................................................................................................................42
Signal conditioning VIs.....................................................................................................................44
ACvtData.VI .................................................................................................................................44
ACnvPrDt.VI.................................................................................................................................45
ACal.VI.........................................................................................................................................46
FromEng.VI..................................................................................................................................47
ToEng.VI ......................................................................................................................................48
ScaleArr.VI...................................................................................................................................49
ScalePnt.VI ..................................................................................................................................50
Counter VIs......................................................................................................................................51
C8254Cfg.VI ................................................................................................................................52
C7266Config.VI............................................................................................................................53
C8536Cfg.VI ................................................................................................................................55
C8536Init.VI .................................................................................................................................56
C9513Config.VI............................................................................................................................57
C9513Init.VI .................................................................................................................................60
CFreqIn.VI....................................................................................................................................62
CIn.VI ...........................................................................................................................................64
CIn32.VI .......................................................................................................................................65
CLoad.VI ......................................................................................................................................66
CLoad32.VI ..................................................................................................................................67
CStatus.VI....................................................................................................................................68
CStore.VI .....................................................................................................................................69
Digital I/O VIs...................................................................................................................................71