Original Code Consulting Original Code Consulting

OCC Home Page    LabVIEW related publications LabVIEW Presentations  BotLabs Web Page - home of the Saurobots!  Links
LabVIEW Utility Programs for Download  LabVIEW Instrument Drivers
  Scientific LabVIEW Programs for Download  LabVIEW Games for Download  3rd Party Programs for Download

LabVIEW Utility Programs
OCC Desktop Utilities Program  Presentation Timer  Easy-to-Maintain Configuration Files  Save Front Panel Values as Defaults  Serial Tools  Log File Component  Create Directory Structure Utility VIs

Below are some general utility programs I have written in LabVIEW and have made available to the LabVIEW community.  All of these are free with the sole condition being that the attribution to their original author be left intact in the VI documentation.  The exception is the OCC Destop Utilities Program, which is available only as a stand-alone executable and is distributed as shareware.  Although it is not required, if you do download any of these programs, I would appreciate hearing from you.  Let me know (using the address at the bottom of this page) how well they work for you, and if you have any suggestions for improvements or observations of bugs that need fixing.

OCC Desktop Utilities Program OCC Desktop Utilities is a versatile program written in LabVIEW but compiled to an executable program and distributed as a shareware program.  This utility is designed to be run automatically at startup. It presents the user with numerous useful resources, including a virtual sticky-pad for storing quick notes, an encrypted list of accounts and passwords, several file handling utilities for adding security to your computer, various timers, and a mechanism for automatically synchronizing the computer clock to NIST time sources.  The LabVIEW Run Time Engine 6.1 is required to run this program.  Source code is not generally available.

Presentation Timer The Presentation Timer program is intended to be used at conferences and meetings to indicate when an event or presentation should end.  It can be run on a laptop and displayed either on the laptop screen or on a projector so that the presenter, chair, and audience have a clear view of when the time has expired.  This program was written in LabVIEW 7.1 and has been compiled to run on Windows 2000, XP, or Mac OS-X.  Both the Windows and Mac versions require the LabVIEW Run-Time Engine (LV-RTE).  This is included in the Windows installation, but must be obtained from National Instruments for the Mac version.  See the Presentation Timer instructions for more information.
   Presentation Timer ver 1.2 for Windows (installer includes LV-RTE, the configuration file, and the instructions document)
   Presentation Timer ver 1.2 for Mac OS-X
   Presentation Timer.ini (default configuration file)
   Presentation Timer Instructions 
Presentation Timer

Easy-to-Maintain Configuration Files (LabVIEW 6.1)  This set of VIs was part of a presentation on several methods of writing configuration data to files in LabVIEW and was also described in an article in LabVIEW Technical Resources (LTR).  (Note:  LTR is no longer in business, and their website is no longer availalbe.)  A description of the VIs can be found in the LTR article, available on the Publications page.  Those interested in accessing the example code are encouraged to contact Original Code Consulting.

Save Front Panel Values as Defaults (LabVIEW 6.0) Save Defaults (130 KB) demonstrates how the VI Server can be used to save the values of front panel controls as defaults so that they are automatically presented the next time the program is run. Additional notes and explanation on how the program works are available.  (This document is included with the download, as is an example program showing how to use the VIs.)

Although many programmers have noticed that a VI Server method for saving default values exists, the fact that this method can not be executed on a running VI has presented difficulties in getting this much-requested functionality to work.  This utility simplifies the process by encapsulating the required code in a single sub-vi call and another dynamically-called VI.  Note, however, that this program does not work in compiled executables.  (The notes discuss this limitation and reference other methods that can be used in this case.)

Serial Tools (LabVIEW 6.0) Serial Tools (291 KB) version 1.6 is a library of VIs that repackages the "classic" LabVIEW serial functions in a more up-to-date format.  Although VISA is the currently accepted standard for serial port communication in LabVIEW, the "classic" serial port functions have their own benefits, including ease of installation for compiled programs (.exe's), since the VISA software layer does not need to be installed on the target machine in this case.  These VI’s include error clusters and error handling, Port Out indicators for better data flow, and enumerated controls for easier handling of Ports and Baud Rates.  In addition, higher level VI’s are included that provide for reading from a serial port with time-outs and with termination characters, writing with termination characters, broadcasting test data out a serial port, and snooping on a serial port for diagnostics.  In addition, a Scanning Serial Port Snooper.vi can be used to help determine the port settings (baud rate, parity, etc) for a serial port that is broadcasting data using unknown settings  Additional examples include a simple terminal emulator program, a Virtual Serial Device VI that acts as a serial communications device, and a VSD Driver for controlling the Virtual Serial Device using a LabVIEW driver.

    Note that with the release of LabVIEW 7.0, these VI's are fairly obsolete.  If this toolkit is loaded into LabVIEW 7.0 or later, the calls to the "classic" serial IO functions will automatically be replaced with compatibility VI's that handle the serial IO through VISA.

Serial Port Resources is a Word document listing various useful hardware and software resources and tips for dealing with serial ports.

Log File Component  (LabVIEW 7.1)  (134 KB)  The Log File Component is a small set of VI's that implement a simple example of a LabVIEW componet using an architecture that I have developed and used on numerous projects.  (See Conway and Watts, A Software Engineering Approach to LabVIEW for more information on LCOD, or LabVIEW Component Oriented Design.)  In addition to providing an example of this architecture (which is the evolution of the Drivers discussed in my paper on the Mass Spectrometer program), this component can be used to easily implement an error and event logging mechanism.  Additional information on how to use the component is included with the download or can be view here.

Create Directory Structure  (LabVIEW 6.1)  Create Directory Structure.vi (60 KB) is a utility that will verify that a path exists and create that path (as many levels deep as required) if it does not exist.  Normally, if you attempt to create a new subdirectory in a new subdirectory in an existing directory, the process will fail.  This VI parses the path to create all the levels of subdirectories that do not yet exist.

Utility VIs (LabVIEW 6.0) UtilityVIs (144 KB) currently includes six example/utility programs.  (Note that due to improvements in LabVIEW and in operating systems, most of these programs are outdated and of limited use.  The most useful of them have been extracted and are available individually below.)
Set File Attributes.vi is a program that changes the file attributes (read-only, archive, and/or hidden) for all files matching user specified criteria.  It is especially useful when files are moved to a new hard drive via a CD-R disk, since direct copies from CD-R's (as opposed to installed programs) leave the Read-Only attribute set, which makes it impossible to save changes to the new copies.  (Note that this is a Windows-only VI, as it calls the Windows API through a dll.)

Error Cluster Generator.vi (15 KB) takes a simple error number and converts it to an error cluster.  It also parses the calling VI's calling chain to create a legible "source" string.  An error in cluster input also allows passing errors through from previous VI's and functions.  This VI is useful for converting older VIs that use simple error numbers to the more modern use of error clusters.  See the Serial Tools above for examples of its use.

Error Selector.vi (13 KB) selects one error cluster out of up to four inputs.  It selects error inputs over warnings, and warnings over empty clusters.  If more than one error (or more than one warning, with no errors) is input, it chooses the error (or warning) closest to the top of the connector pane (or front panel).
Although it is usually wise to log or acknowledge every error, there are times when one may need to combine errors from multiple sources and report only one.  One such case is when acquisition is occuring from multiple sources in parallel.  These parallel calls should often not be wired together with their error clusters, since that serializes them (losing any benefit of parallel execution) and because an error in one could prevent legitimate data from being acquired from the others.  Although you may want to log all errors from all sources, it may be useful to present the operator with a single error.  If more than one data source is generating an error, the operator may not see the second error right away, but when he/she fixes the first fault, the second will likely still be occuring and will then be seen.

Control Memory.vi is a re-entrant, polymorphic VI based on an article in LabVIEW Technical Resources.  It can be used to facilitate user interface polling loops.  In this situation, this VI can replace a shift register and related logic for detecting when a control has changed value.  This VI supports Booleans, all numeric types, strings, and arrays of doubles.  Other simple numeric arrays can be used with coercion.  For more complex data types (clusters), a new instance of this VI must be made..

Wait+ (ms) (reentrant).vi is a minor revision on an NI VI.  The Wait+ (ms).vi is a relatively useful packaging of the Wait (ms) function in a Vi that provides error chaining.  Unfortunately, NI hid this VI in a low Daq sub-pallette.  The main difference between this VI and NI's is that this VI is set to be reentrant, so that it acts more like the Wait (ms) function when called from more than one place in a set of parallel VI's.  (In LabVIEW 6.0 and later, their version of this function is also reentrant.)

The sixth VI in this library is Search Recursively.vi, which is used by the Set File Attributes.vi.  It was developed by NI.  It returns a list of all files in a directory and in all sub-directories in that directory's hierarchy.

OCC Home Page  Top  LabVIEW related publications LabVIEW Presentations  BotLabs Web Page - home of the Saurobots!  Links
Please report any bad links, other problems, or comments to: