Original Code Consulting
General LabVIEW VIs and Programs
|OCC Compare Version Strings.vi (15KB, LV 2013) is used to compare version strings of the type "n.n.n.n" to tell if one string represents an earlier or later version than the other. For version strings, each "n" is interpreted as an integer. This function interprets each integer, so that version 1.11 is recognized as greater than version 1.2, for example. Note that missing minor versions are interpreted as 0, so that verion 1.1.0 is equal to version 1.1. Also note that this VI is only designed to work with version integers of up to four digits. E.g. it can parse version 1.9999.1.0 correctly, but is not guaranteed to parse version 1.10001.1.0 correctly. In addition, this VI ignores insignificant formatting issues, such as extra spaces or leading zeros in any of the sub-versions.|
|Make Everything Visible (21KB, LV 2009) is a small utility for use during the development of UI-intensive LabVIEW applications.This VI can be dropped on a block diagram of a top-level VI and is used to make all the controls and indicators on the top-level VI visible for development purposes. Often, such UI VIs have many elements that are made visible and invisible at different pointsduring execution. Since many of them are invisiible while editing, it can be difficult to know where to add or how to align new UI elements. Instructions for its use are included on the front panel of the VI.|
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 version (2.0) of the program was written in LabVIEW
8.2 and has been compiled to run on Windows 2000 or
XP. This program requires the LabVIEW 8.2 Run Time
Engine (RTE). Two versions of the installer for
this program are available, a 4.8 MB download that does
not include the RTE, and a 57 MB download that does
include the RTE. If you already have the LV 8.2
RTE installed on your computer, or if you want to get
the LV RTE directly from National
Instruments, use the smaller download. I
appologize for the size of these downloads. As the
LabVIEW program has grown and matured, the size of this
type of compiled program has exploded. I will look
at ways to reduce the size of these downloads in the
New features in version 2.0 include the ability to play a .wav sound file when an alarm goes of, a graphical interface for configuring the timers and options, a time-of-day clock mode, and features that make it possible to use this timer on the same computer as the presentation (e.g. Powerpoint).
Version 2.0 of the Presentation Timer is Shareware. You may try it for up to three weeks. If you choose to continue using the program after that point, please see the Register menu item in the program for instructions on registering the program. Registration costs $10.00.
Presentation Timer ver 2.0 for Windows (58 MB) (installer includes LV-RTE, sample sounds, and instructions)
(Note that when this version is installed, a license agreement appears. This license refers to the LabVIEW Run Time Engine.)
Presentation Timer ver 2.0 for Windows without RTE (4.8 MB) (includes instructions and sounds)
Presentation Timer Instructions
| The OCC
Sync UTC Time program provides a simple interface for
synchronizing a Windows computer to the time signal
provided by an NTP server. Both time and date are
synchronized to a sub-second accuracy. Note that
this program sets the computer System Time to the UTC
time on the NTP server. The computer time will be
further adjusted according to the time zone selected in
The list of available NTP servers is determined by the OCC Sync UTC Time.ini file, located in the program directory. If this file is not present, it is created with a single NIST NTP server listed. To alter the list of NTP servers, edit the .ini file and add entries of the form
NTP n = xxx.xxx.xxx.xxx
where n is an integer starting with 0 and increasing sequentially andxxx.xxx.xxx.xxx is the IP address of an NTP server.
This software is freeware licensed under the Creative Commons Attribution-No Derivative Works 3.0 License (http://creativecommons.org/). It may be freely distributed and used as long as no derivative products are developed and the attribution to the original author remains intact.
OCC Sync UTC Time ver 184.108.40.206 for Windows (55MB) (This installs a built executable program with the LabVIEW Run-Time Engine and can be run on any Windows 2000 or XP system without additional software.)
OCC Sync UTC Time LabVIEW 8.2.1 source code version 220.127.116.11 (543KB) (This zip file includes the LabVIEW source code for the program, the dll that it calls, and all the project files required for building an executable and installer.)
|(LabVIEW 8.20) Color Ramp Calculator (56KB) is a set of three VIs that implement a simple interface for choosing a color ramp of up to 256 colors. This zip file contains three VIs. Color Ramp Calculator is the main working VI. The Choose Color Ramp.vi (shown on the right) is an implementation of a user dialog showing how the Color Ramp Calculator can be used. The Color Component Generator is a sub-vi used by the Color Ramp Calculator and is a modification of a VI distributed by Naitonal Instruments in an example. Compared to NI's color ramp interface, this implementation has two advantages: the user interface is simpler, and it is able to generate a color ramp of any number of elements up to 256.|
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 Port Resources
is a Word document listing various useful hardware and
software resources and tips for dealing with serial ports.
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.