While National Instruments seeks to innovate with each new version of LabVIEW, the company focuses equally on addressing the concerns and requests of current LabVIEW programmers. In developing LabVIEW 8.5, NI invested considerable time and energy improving the LabVIEW Project. First introduced in LabVIEW 8, the LabVIEW Project dramatically simplified the process of deploying code to LabVIEW Real-Time, FPGA, and embedded targets, but experienced LabVIEW programmers suggested further enhancements to address their development challenges.
In response to developer requests, the significant LabVIEW Project improvements in LabVIEW 8.5 help tackle two major development challenges. The first is viewing and managing all the files on disk that are part of a development project, which becomes more difficult as the application’s size increases. The second development challenge is preventing VI cross-linking, which occurs when a VI links to unintended subVIs without the knowledge of the developer. This issue has frustrated even the most seasoned LabVIEW developers because cross-linking is usually difficult to identify and untangle.
Synchronize LabVIEW Project Folders to Disk
For developers who are familiar with the LabVIEW Project, a quick glance at the new LabVIEW Project Explorer in LabVIEW 8.5 reveals an obvious change – the new tabbed view. In the Items tab, developers interact with familiar components of the LabVIEW Project that existed in LabVIEW 8 and 8.20, such as My Computer, Build Specifications, and Dependencies (see Figure 1). In the new Files tab, developers can interactively view and choose to change the locations of all the files in their LabVIEW Projects (see Figure 2).
Figure 1. Within the new LabVIEW Project Items tab, developers now can synchronizeLabVIEW Project folders to directories on the hard drive.
Figure 2. Using the new LabVIEW Project Files tab, developers can visually identifyincorrect code being called by the LabVIEW Project based on its location on disk.
Since the inception of the LabVIEW Project in LabVIEW 8, developers have requested the ability to define more concrete relationships between LabVIEW Project folders and folders on the hard drive. In LabVIEW 8.5, developers can synchronize LabVIEW Project folders to directories on disk to simplify managing all the files that compose an application. These new LabVIEW Project folders, known as auto-populated folders, are constantly updated (in other words, populated) based on the contents of their corresponding physical directories. Developers can create new auto-populated folders by right-clicking on My Computer in the Items tab. They can quickly convert virtual folders in existing LabVIEW Projects to auto-populated folders through their right-click menus as well.
Auto-populated LabVIEW Project folders provide access to all the files in working directories and immediately reflect any changes developers make on disk (such as adding, moving, or deleting files). The trade-off when using auto-populated folders instead of virtual folders is that with auto-populated folders, developers cannot impose a custom, virtual organization on their files separate from the hierarchy on disk. The contents of auto-populated folders always exactly match the organization of the physical directories. However, with LabVIEW 8.5, developers can use auto-populated folders and virtual folders in the same LabVIEW Project to combine both approaches for maximum flexibility.
Improve File Management by Eliminating Cross-Linking
LabVIEW 8.5 also includes several new tools intended to help developers prevent cross-linking. Cross-linking occurs when a VI mistakenly links to the wrong subVI. For example, if a developer moves the location of a VI on disk through Windows Explorer, LabVIEW must search for and relink with the missing VI when it is next needed. In some cases, LabVIEW accidentally links to an earlier revision or separate branch of the same code, or to a different VI with the same name, causing unexpected behavior that is difficult to pinpoint and debug.
The first tool to help developers prevent cross-linking in LabVIEW 8.5 is the new Files tab. With the Files tab, developers can visually confirm that unwanted VIs and other files located in obsolete directories are not accidentally included in a particular LabVIEW Project. Unlike with Windows Explorer, the Files tab shows only those directories on disk that contain files included in the LabVIEW Project. Developers can move files on disk using the Files tab without adversely affecting VI linking. When a developer moves a VI through the Files tab, LabVIEW automatically updates all callers within that LabVIEW Project with the latest file location information for that VI.
The LabVIEW Project features additional warnings and debugging tools to help developers understand and prevent cross-linking. When LabVIEW does identify a potential cross-linking situation, it notifies the developer by displaying [Conflict] after the name of the VI in the LabVIEW Project (see Figure 1). This message means that LabVIEW has detected more than oneVI being called somewhere in the same LabVIEW Project with the same name. Developers can resolve conflicts with a new dialog accessible from the LabVIEW Project toolbar that helps them take a top-down approach to reference only the correct files.
For example, if a developer has two different versions of Init.vi being called by code in the same LabVIEW Project, the new Resolve Conflicts dialog helps the developer determine which version is correct and helps remove the incorrect Init.vi from the LabVIEW Project. As a result, a LabVIEW application loads only the versions of files that developers explicitly specify, drastically reducing the chances that a developer’s code accidentally calls the wrong version of a VI.
Michael Neal is a LabVIEW product manager. He holds a Bachelor of Science in structural engineering and a Master of Science in biomedical engineering from The University of Texas at Austin.
Learn more about LabVIEW Project enhancements.
Additional New Features in LabVIEW 8.5
In addition to taking advantage of new LabVIEW Project enhancements, with LabVIEW 8.5 you can do the following:
Program Graphical Statecharts
Design complex state machines, event-based systems, and advanced control logic with the new LabVIEW Statechart Module. Deploy LabVIEW statechart code to PCs, real-time controllers, and FPGA targets.
Merge Graphical LabVIEW Code
Merge individual VIs into a single VI during development. This feature complements existing LabVIEW differencing and source code control tools commonly used by advanced developers.
Quickly Acquire and Process Images
Build a complete machine vision application in two simple steps with the new Vision Acquisition and Vision Assistant Express VIs.
Optimize Memory Usage within VIs
Decrease VI memory usage and increase performance with the In Place Element Structure. Within the boundaries of this new structure, the LabVIEW compiler does not make copies of data during operations.
Use Industry-Standard Math IP
Develop algorithms based on accepted industry-standard mathematical functions, such as the BLAS linear algebra library.
Connect LabVIEW to Any PLC
Connect LabVIEW to thousands of third-party industrial devices such as programmable logic controllers (PLCs) with new NI OPC servers.
Explore LabVIEW 8.5 in more detail.
This article first appeared in the Q3 2007 issue of Instrumentation Newsletter.
Reader Comments | Submit a comment »
Legal
This material is protected under the copyright laws of the U.S. and other countries and any uses not in conformity with the copyright laws are prohibited, including but not limited to reproduction, DOWNLOADING, duplication, adaptation and transmission or broadcast by any media, devices or processes.
