LabVIEW

LabVIEW
Developer(s) National Instruments
Initial release 1986 (1986)
Stable release
2016 / August 2016 (2016-08)
Operating system Cross-platform: Windows, macOS, Linux
Type Data acquisition, instrument control, test automation, analysis and signal processing, industrial control, embedded system design
License Proprietary
Website www.ni.com/labview

Laboratory Virtual Instrument Engineering Workbench (LabVIEW) is a system-design platform and development environment for a visual programming language from National Instruments.

The graphical language is named "G"; not to be confused with G-code. Originally released for the Apple Macintosh in 1986, LabVIEW is commonly used for data acquisition, instrument control, and industrial automation on a variety of operating systems (OSs), including Microsoft Windows, various versions of Unix, Linux, and macOS. The latest version of LabVIEW is 2016, released in August 2016.

Dataflow programming

The programming language used in LabVIEW, named G, is a dataflow programming language. Execution is determined by the structure of a graphical block diagram (the LabVIEW-source code) on which the programmer connects different function-nodes by drawing wires. These wires propagate variables and any node can execute as soon as all its input data become available. Since this might be the case for multiple nodes simultaneously, G can execute inherently in parallel. Multi-processing and multi-threading hardware is exploited automatically by the built-in scheduler, which multiplexes multiple OS threads over the nodes ready for execution.

Graphical programming

LabVIEW integrates the creation of user interfaces (termed front panels) into the development cycle. LabVIEW programs-subroutines are termed virtual instruments (VIs). Each VI has three components: a block diagram, a front panel, and a connector panel. The last is used to represent the VI in the block diagrams of other, calling VIs. The front panel is built using controls and indicators. Controls are inputs: they allow a user to supply information to the VI. Indicators are outputs: they indicate, or display, the results based on the inputs given to the VI. The back panel, which is a block diagram, contains the graphical source code. All of the objects placed on the front panel will appear on the back panel as terminals. The back panel also contains structures and functions which perform operations on controls and supply data to indicators. The structures and functions are found on the Functions palette and can be placed on the back panel. Collectively controls, indicators, structures, and functions will be referred to as nodes. Nodes are connected to one another using wires, e.g., two controls and an indicator can be wired to the addition function so that the indicator displays the sum of the two controls. Thus a virtual instrument can be run as either a program, with the front panel serving as a user interface, or, when dropped as a node onto the block diagram, the front panel defines the inputs and outputs for the node through the connector pane. This implies each VI can be easily tested before being embedded as a subroutine into a larger program.

The graphical approach also allows nonprogrammers to build programs by dragging and dropping virtual representations of lab equipment with which they are already familiar. The LabVIEW programming environment, with the included examples and documentation, makes it simple to create small applications. This is a benefit on one side, but there is also a certain danger of underestimating the expertise needed for high-quality G programming. For complex algorithms or large-scale code, it is important that a programmer possess an extensive knowledge of the special LabVIEW syntax and the topology of its memory management. The most advanced LabVIEW development systems offer the ability to build stand-alone applications. Furthermore, it is possible to create distributed applications, which communicate by a client–server model, and are thus easier to implement due to the inherently parallel nature of G.

Benefits

Interfacing to devices

LabVIEW includes extensive support for interfacing to devices, instruments, cameras, and other devices. Users interface to hardware by either writing direct bus commands (USB, GPIB, Serial) or using high-level, device-specific, drivers that provide native LabVIEW function nodes for controlling the device.

LabVIEW includes built-in support for NI hardware platforms such as CompactDAQ and CompactRIO, with a large number of device-specific blocks for such hardware, the Measurement and Automation eXplorer (MAX) and Virtual Instrument Software Architecture (VISA) toolsets.

National Instruments makes thousands of device drivers available for download on the NI Instrument Driver Network (IDNet).[1]

Code compiling

LabVIEW includes a compiler that produces native code for the CPU platform. This aids performance. The graphical code is translated into executable machine code by interpreting the syntax and by compiling. The LabVIEW syntax is strictly enforced during the editing process and compiled into the executable machine code when requested to run or upon saving. In the latter case, the executable and the source code are merged into a single file. The executable runs with the help of the LabVIEW run-time engine, which contains some precompiled code to perform common tasks that are defined by the G language. The run-time engine reduces compiling time and provides a consistent interface to various operating systems, graphic systems, hardware components, etc. The run-time environment makes the code portable across platforms. Generally, LabVIEW code can be slower than equivalent compiled C code, although the differences often lie more with program optimization than inherent execution speed.

Large libraries

Many libraries with a large number of functions for data acquisition, signal generation, mathematics, statistics, signal conditioning, analysis, etc., along with numerous graphical interface elements are provided in several LabVIEW package options. The number of advanced mathematic blocks for functions such as integration, filters, and other specialized abilities usually associated with data capture from hardware sensors is enormous. In addition, LabVIEW includes a text-based programming component named MathScript with added functions for signal processing, analysis, and mathematics. MathScript can be integrated with graphical programming using script nodes and uses a syntax that is compatible generally with MATLAB.[2]

Parallel programming

LabVIEW is an inherently concurrent language, so it is very easy to program multiple tasks that are performed in parallel via multithreading. For example, this is done easily by drawing two or more parallel while loops. This is a great benefit for test system automation, where it is common practice to run processes like test sequencing, data recording, and hardware interfacing in parallel.

Ecosystem

Due to the longevity and popularity of the LabVIEW language, and the ability for users to extend its functions, a large ecosystem of third party add-ons has developed via contributions from the community. This ecosystem is available on the LabVIEW Tools Network, which is a marketplace for both free and paid LabVIEW add-ons.

User community

There is a low-cost LabVIEW Student Edition aimed at educational institutions for learning purposes. There is also an active community of LabVIEW users who communicate through several electronic mailing lists (email groups) and Internet forums.

Home Bundle Edition

National Instruments provides a low cost LabVIEW Home Bundle Edition.[3]

Criticism

LabVIEW is a proprietary product of National Instruments. Unlike common programming languages such as C or Fortran, LabVIEW is not managed or specified by a third party standards committee such as American National Standards Institute (ANSI), Institute of Electrical and Electronics Engineers (IEEE), International Organization for Standardization (ISO), etc.

Dataflow programming model

Due to its thorough adoption of a data-flow programming model, as opposed to the sequential ordering of arbitrary commands like most other (usually text-based) languages, a barrier occurs for many people who attempt to apply already-learned principles from other programming approaches to LabVIEW. The inherent parallel nature of the execution of LabVIEW code is a perennial source of confusion among those accustomed to other approaches. Thus, most opinions tend to be highly polarised, with people being either very fond of it or very hostile to it.

Licensing

Building a stand-alone application with LabVIEW requires the Application Builder component which is included with the Professional Development System but requires a separate purchase if using the Base Package or Full Development System.[4]

Run-time environment

Compiled executables produced by version 6.0 and later of the Application Builder are not truly standalone in that they also require the LabVIEW run-time engine be installed on any target computer which runs the application.[5] The use of standard controls requires a run-time library for any language. All major operating systems supply the libraries needed for common languages such as C, but no operating system supplies the run-time needed for LabVIEW. It must be installed specifically by an administrator or user. This can cause problems if an application is distributed to a user who is prepared to run the application, but lacks the inclination or permission to install added files on the host system before running the executable.

Parallel execution and race conditions

The G language includes constructs for creating multiple execution threads. Like with any language that targets non-deterministic operating systems such as Windows, Mac OS, and Linux, parallel execution of multiple threads can lead to the possibility of race conditions. Although the G language greatly simplifies both the programming and thread management on multi-core and multi-processor systems, the G developer must still guard against race conditions; for which there are several functions and techniques available for doing so. Programming with the LabVIEW field-programmable gate array (FPGA) module results in true parallel implementation on FPGA targets.

Performance

LabVIEW tends to produce applications that are slower than hand coded native languages such as C, although high performance can be achieved when using multi-core machines or dedicated toolkits for specific operations. LabVIEW makes multi-core programming much simpler than many other languages, due to its implicit parallelism and automatic thread management.[6]

Light weight applications

Very small applications still have to start the runtime environment which is a large and slow task. This tends to restrict LabVIEW to monolithic applications. Examples of this might be tiny programs to grab a single value from some hardware that can be used in a scripting language - the overheads of the runtime environment render this approach impractical with LabVIEW.

Timing system

LabVIEW uses the January 1, 1904 epoch as its zero time. Other programs that use the January 1, 1904 epoch are Apple Inc.'s classic Mac OS, Palm OS, and Microsoft Excel (optionally).[7]

Non-textual

G language being non-textual, software tools such as versioning, side-by-side (or diff) comparison, and version code change tracking cannot be applied in the same manner as for textual programming languages. There is some additional tool to make comparison and merge of code with source code control (versionning) like subversion, CVS, Perforce. [8][9] [10]

Not backward compatible

A VI generated in a newer version of LabVIEW cannot be opened in an older version, not even for viewing. The "Save for Previous Version" feature can be a partial [11] solution, if a developer knows up-front that this would be needed.

No zoom function

There is no ability to zoom in to (or enlarge) a VI which will be hard to see on a large, high-resolution monitor, although this feature is under development as of 2016.[12][13]

Release history

In 2005, starting with LabVIEW 8.0, major versions are released around the first week of August, to coincide with the annual National Instruments conference NI Week, and followed by a bug-fix release the following February.

In 2009, National Instruments began naming releases after the year in which they are released. A bug-fix is termed a Service Pack, for example, the 2009 service pack 1 was released in February 2010.

Name-version Build number Date
LabVIEW project begins April 1983
LabVIEW 1.0 (for Macintosh) ?? October 1986
LabVIEW 2.0 ?? January 1990
LabVIEW 2.5 (first release for Sun & Windows) ?? August 1992
LabVIEW 3.0 (Multiplatform) ?? July 1993
LabVIEW 3.0.1 (first release for Windows NT) ?? 1994
LabVIEW 3.1 ?? 1994
LabVIEW 3.1.1 (first release with "application builder" ability) ?? 1995
LabVIEW 4.0 ?? April 1996
LabVIEW 4.1 ?? 1997
LabVIEW 5.0 ?? February 1998
LabVIEW RT (Real Time) ?? May 1999
LabVIEW 6.0 (6i) 6.0.0.4005 26 July 2000
LabVIEW 6.1 6.1.0.4004 12 April 2001
LabVIEW 7.0 (Express) 7.0.0.4000 April 2003
LabVIEW PDA module first released ?? May 2003
LabVIEW FPGA module first released ?? June 2003
LabVIEW 7.1 7.1.0.4000 2004
LabVIEW Embedded module first released ?? May 2005
LabVIEW 8.0 8.0.0.4005 September 2005
LabVIEW 8.20 (native Object Oriented Programming) ?? August 2006
LabVIEW 8.2.1 8.2.1.4002 21 February 2007
LabVIEW 8.5 8.5.0.4002 2007
LabVIEW 8.6 8.6.0.4001 24 July 2008
LabVIEW 8.6.1 8.6.0.4001 10 December 2008
LabVIEW 2009 (32 and 64-bit) 9.0.0.4022 4 August 2009
LabVIEW 2009 SP1 9.0.1.4011 8 January 2010
LabVIEW 2010 10.0.0.4032 4 August 2010
LabVIEW 2010 f2 10.0.0.4033 16 September 2010
LabVIEW 2010 SP1 10.0.1.4004 17 May 2011
LabVIEW for LEGO MINDSTORMS (2010 SP1 with some modules) August 2011
LabVIEW 2011 11.0.0.4029 22 June 2011
LabVIEW 2011 SP1 11.0.1.4015 1 March 2012
LabVIEW 2012 12.0.0.4029 August 2012
LabVIEW 2012 SP1 12.0.1.4013 December 2012
LabVIEW 2013 13.0.0.4047 August 2013
LabVIEW 2013 SP1 13.0.1.4017 March 2014[14]
LabVIEW 2014 August 2014
LabVIEW 2014 SP1 14.0.1.4008 March 2015
LabVIEW 2015 15.0f2 August 2015
LabVIEW 2015 SP1 15.0.1f1 March 2016
LabVIEW 2016 16.0.0 August 2016

Repositories and libraries

OpenG, as well as LAVA Code Repository (LAVAcr), serve as repositories for a wide range of Open Source LabVIEW applications and libraries. SourceForge has LabVIEW listed as one of the possible languages in which code can be written.

VI Package Manager has become the standard package manager for LabVIEW libraries. It is very similar in purpose to Ruby's RubyGems and Perl's CPAN, although it provides a graphical user interface similar to the Synaptic Package Manager. VI Package Manager provides access to a repository of the OpenG (and other) libraries for LabVIEW.

Tools exist to convert MathML into G code.[15]

Related software

National Instruments also offers a product named Measurement Studio, which offers many of the test, measurement, and control abilities of LabVIEW, as a set of classes for use with Microsoft Visual Studio. This allows developers to harness some of LabVIEW's strengths within the text-based .NET Framework. National Instruments also offers LabWindows/CVI as an alternative for ANSI C programmers.

When applications need sequencing, users often use LabVIEW with TestStand test management software, also from National Instruments.

The Ch interpreter is a C/C++ interpreter that can be embedded in LabVIEW for scripting.[16]

The TRIL Centre Ireland BioMobius platform and DSP Robotics' FlowStone DSP also use a form of graphical programming similar to LabVIEW, but are limited to the biomedical and robotics industries respectively.

LabVIEW has a direct node with modeFRONTIER, a multidisciplinary and multi-objective optimization and design environment, written to allow coupling to almost any computer-aided engineering tool. Both can be part of the same process workflow description and can be virtually driven by the optimization technologies available in modeFRONTIER.

See also

References

Further reading

Articles on specific uses

Articles on education uses

External links

This article is issued from Wikipedia - version of the 11/30/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.