As we all know, time is a precious factor for engineers in every aspect. Whether you need to collect data faster to enable software to more accurately reflect real-world signals, synchronize remote systems, or simply complete your work more quickly, time is crucial.
As a graphical programming language, NI's LabVIEW software helps save you time compared to compiling G language. The graphical programming approach allows you to focus solely on the data and its manipulation, abstracting away many complex computer programming tasks such as memory allocation and syntax rules, thereby further improving your productivity. Furthermore, LabVIEW includes advanced timing mechanisms and application API functions to define the parameters and relationships of time constraints between hardware and software.
The latest version of LabVIEW software, LabVIEW 2010, features optimizations for various timing implementations. This latest version is a comprehensive update to the entire software platform, including new features driven directly by customer needs, new FPGA IP modules, enhanced timing and synchronization capabilities, and an improved back-end compiler for generating optimized machine code, resulting in an overall application performance improvement of up to 20%.
Figure 1. Compared to LabVIEW 2009, LabVIEW 2010 offers up to 20% improvement in application performance.
This article will provide a comprehensive overview of LabVIEW 2010 from three aspects: compiler optimization, built-in timing and synchronization, and new features proposed by users.
Compiler optimization
The LabVIEW compiler is a key technology for improving programming efficiency. It handles complex tasks such as memory allocation and thread management, and provides feedback to the user during editing when block diagram code is not executable. Ultimately, the sophisticated compiler and optimization threads parse your high-level design and return highly efficient machine code.
Over the past few decades, compilers have become increasingly intelligent and optimized, incorporating inplaceness, type propagation, clustering, virtual registers, text compiler optimizations, and other intelligent processing methods from NI's compiler development team. Whether it's a new feature, a bug fix, or a compiler improvement, each release introduces an updated compiler, optimizing your code performance. One of the focuses of LabVIEW 2010 is VI runtime performance – meaning improving your VI's performance without changing the source code itself.
To improve your code execution efficiency faster without modifying your code, developers introduced two "layers" into the compiler hierarchy. LabVIEW 2009 introduced Data Flow Intermediate Code Representation (DFIR), a high-level architecture for transforming data flow-driven graphical code generated from your block diagram. LabVIEW 2010 added a Low-Level Virtual Machine (LLVM)-based backend, providing a new standard compiler optimization (Figure 2). DFIR and LLVM work together to provide high-level and low-level intermediate code representations, allowing the compiler to subdivide and optimize LabVIEW programs using intermediate code. In LabVIEW 2010, the use of intermediate code representation means that the compiler optimization thread does not affect the actual block diagram, but by generating optimized machine code, it can improve the runtime performance of your application by up to 20%.
Figure 2. The new LabVIEW compilation flow
LabVIEW 2010 offers new capabilities to support the development of large applications by helping you manage source code and develop more modular software architectures. By separating compiled objects from the source code written in LabVIEW, LabVIEW 2010 significantly improves the developer's workflow. When this new VI property option is enabled, a VI will not appear modified after recompiling unless the developer modifies the graphical source code; this avoids the need to re-save and resubmit files to source control.
The new Packaged Project Library provides a more modular software design and development process, shorter build times, and easier deployment. A LabVIEW Packaged Project Library file is a new LabVIEW file type that combines a project library and all involved subroutines into a single file. Exported VIs are included in this file, just like other VIs saved without block diagrams, but their hierarchy is completely hidden. They follow a build specification; existing .lvlib files are selected to determine which VIs are being built into the packaged project library and which VIs are public or exported.
Built-in timer and synchronization
Most computer applications must meet the time constraints required by the physical computer system they interact with. If your system environment does not have a well-defined time concept, you will find it difficult to write a timed program.
Fortunately, LabVIEW offers many unique mechanisms for handling time. For example, the timer loop structure is a well-defined API function node within your application for specifying time constraint parameters. Additionally, you can use timer loops to configure priorities, processor allocation, and timing sources. You can synchronize multiple timer loops within a single system or as parts of a distributed real-time system.
LabVIEW 2010 introduces a new time-based synchronization technology, further expanding the functionality of LabVIEW applications. This allows LabVIEW to synchronize different LabVIEW real-time target platforms via standard Ethernet. LabVIEW 2010 has incorporated the execution status of the software's IEEE 1588 protocol as another timing source for the timing loop, providing absolute time with a resolution of 1ms. Furthermore, to control the timing source and functionality, LabVIEW 2010 introduces a new internal timing mechanism that helps you measure across multiple timing resolutions. Thanks to the timing loop, your code can be ported from millisecond-level systems on desktop processors to nanosecond-level systems with FPGA backplane processors, preserving the same application code segments.
Community-driven new features
The LabVIEW community has a profound impact on your success with LabVIEW. Members can provide technical support to others on the NI forums, upload sample code to the NI Developer Community, and/or user groups. Furthermore, the LabVIEW community had a decisive influence on LabVIEW 2010.
LabVIEW Idea Exchange – In August 2009, NI established the LabVIEW Idea Exchange, a forum for product feedback that connects the LabVIEW community and LabVIEW development teams to help identify new features for each version. LabVIEW 2010 included 14 such features, directly derived from community member feedback.
Excellent technical support – The community also provides feedback on technical support issues that NI engineers handle daily. Given that LabVIEW is often used with collaborative hardware, the most common technical support issues are related to the configuration of distributed hardware. You can install new web-based monitoring and configuration utilities on distributed hardware, and then configure your hardware directly through a browser, similar to configuring a router. You can also monitor performance and memory information, use a file browser, and interact directly with the real-time operating system (RTOS).
Figure 3. Network-based monitoring and configuration utilities simplify the management of remote hardware.
Third-Party Add-ons Developed with LabVIEW – To enhance the packaging and distribution capabilities of third-party add-ons, LabVIEW 2010 introduced several improvements. For code development, LabVIEW Scripting, a programmable application programming interface (API) that automatically generates LabVIEW code, can be used directly. Additionally, licensing and activation help developers create evaluation versions of their software and ensure that add-on toolkits and applications developed using LabVIEW function correctly after licensing. For packaging add-ons, the VI Packaging Manager software from the JKI Software team provides a streamlined packaging process with tightly integrated licensing/activation functionality.
Conclusion
As a programming language for engineers and scientists, LabVIEW has continuously broken through and improved itself for more than 20 years, integrating the most cutting-edge commercially available technologies. The new 2010 version further enables you to keep up with the times and achieve innovation in various engineering applications!