Original Code
          Consulting Original Code Consulting

OCC Home Page    Products  MICAS-X  LabVIEW related
              publications  LabVIEW Presentations
General VIs and
              Programs  File and Directory Utilities  LabVIEW Instrument
              Drivers
  Scientific LabVIEW
              Programs for Download  LabVIEW Games for Download

LabVIEW File and Directory Utility Programs
 FTP MLSD Command  Truncate Long Paths  Easy-to-Maintain Configuration
              Files  Log File Component  Create Directory
              Structure

Below are some file and directory 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.  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.

FTP MLSD
              Command  (LabVIEW 2015)  When I was writing an FTP client VI, I found that some file servers would return nothing in response to the LIST (directory list) command if the directory name had spaces in it. This issue has been found before and is discused on NI's forums. This download is my attempt at implementing the FTP MLSD command. MLSD is not recognized by all FTP servers, so logic is included to first try the MLSD, then the LIST command. These VI's are not completely polished, but should serve as a useful starting point if you run into the same FTP issue. Hopefully NI will incorporate this functionality in a future release of LabVIEW.


Truncate File Path  (LabVIEW 8.20)  The purpose of this VI is to be able to display long file paths optimally in a short string indicator.  As shown in the image on the right, a path is used as input, and the output is a string which is sized to fit in the desired indicator.  The Font, Font Size, and Font Style are taken into account when fitting the path into the indicator, as is the size of the indicator itself.  The example VI shown to the right is included in the Truncate Long Path (42KB) download, along with the sub-vi that does the work.
   Note that although the subVI is technically platform independent, the logic used to truncate the file path assumes Windows path syntax.  Also, this VI is intended to work with single line string indicators.
   A version of this VI that has been converted to an XControl is available on the LAVA website.

 Truncate Long Path Example


Easy-to-Maintain
            Configuration Files (LabVIEW 6.1)  This set of VIs (775 KB) 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.)  The LTR article, available on the Publications page, is included in the download above with the LabVIEW VIs.

Version 1.2 of these Configuration File VIs has now been released.  This version (408 KB, LabVIEW 8.2) has several improvements.  It now includes direct support for 1D arrays of simple elements, as well as a tool for renaming a section of a configuration file.  Note that the PDF of the above article is not included in this zip file, but can still be downloaded separately.

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.

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

Site Map and
                        Downloads