Sunday, 7 September 2014

LabVIEW




TUTORIAL FOR BEGINNERS



CLICK HERE TO DOWNLOAD:  Introduction to LabVIEW PDF (a simple course)

For full training visit : http://www.ni.com/academic/students/learn-labview/
LabVIEW
LabVIEW logo.
Developer(s)National Instruments
Stable release2014 / August 2014
Operating systemCross-platformWindowsMac OS XLinux
TypeData AcquisitionInstrument ControlTest AutomationAnalysis and Signal ProcessingIndustrial ControlEmbedded Design
LicenseProprietary
Websiteni.com/labview
LabVIEW (short for Laboratory Virtual Instrument Engineering Workbench) 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 platforms including Microsoft Windows, various versions of UNIX, Linux, and Mac OS X. The latest version of LabVIEW is LabVIEW 2014, released in August 2014.

Dataflow programming

The programming language used in LabVIEW, also referred to as 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 is inherently capable of parallel execution. Multi-processing and multi-threading hardware is automatically exploited by the built-in scheduler, which multiplexes multiple OS threads over the nodes ready for execution.

Graphical programming

LabVIEW ties the creation of user interfaces (called front panels) into the development cycle. LabVIEW programs/subroutines are called 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 either be run as 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 given 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 non-programmers 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 the programmer possesses an extensive knowledge of the special LabVIEW syntax and the topology of its memory management. The most advanced LabVIEW development systems offer the possibility of building stand-alone applications. Furthermore, it is possible to create distributed applications, which communicate by a client/server scheme, and are therefore easier to implement due to the inherently parallel nature of G.

Benefits

Interfacing

A key feature of LabVIEW is the extensive support for accessing instrumentation hardware. Drivers and abstraction layers for many different types of instruments and buses are included or are available for inclusion. These present themselves as graphical nodes. The abstraction layers offer standard software interfaces to communicate with hardware devices. The provided driver interfaces save program development time. The sales pitch of National Instruments is, therefore, that even people with limited coding experience can write programs and deploy test solutions in a reduced time frame when compared to more conventional or competing systems. A new hardware driver topology (DAQmxBase), which consists mainly of G-coded components with only a few register calls through NI Measurement Hardware DDK (Driver Development Kit) functions, provides platform independent hardware access to numerous data acquisition and instrumentation devices. The DAQmxBase driver is available for LabVIEW on Windows, Mac OS X and Linux platforms.
Although not a .NET language, LabVIEW also offers an interface to .NET Framework assemblies, which makes it possible to use, for instance, databases and XML files in automation projects.

Code compilation

In terms of performance, LabVIEW includes a compiler that produces native code for the CPU platform. The graphical code is translated into executable machine code by interpreting the syntax and by compilation. 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 compile time and also 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 capabilities usually associated with data capture from hardware sensors is immense. In addition, LabVIEW includes a text-based programming component called MathScript with additional functionality for signal processing, analysis and mathematics. MathScript can be integrated with graphical programming using "script nodes" and uses a syntax that is generally compatible with MATLAB

Code re-use

The fully modular character of LabVIEW code allows code reuse without modifications: as long as the data types of input and output are consistent, two subVIs are interchangeable.
The LabVIEW Professional Development System allows creating stand-alone executables and the resultant executable can be distributed an unlimited number of times. The run-time engine and its libraries can be provided freely along with the executable.
A benefit of the LabVIEW environment is the platform independent nature of the G code, which is (with the exception of a few platform-specific functions) portable between the different LabVIEW systems for different operating systems (Windows, Mac OS X and Linux). National Instruments is increasingly focusing on the capability of deploying LabVIEW code onto an increasing number of targets including devices like Phar Lap orVxWorks OS based LabVIEW Real-Time controllers, FPGAs, PocketPCs, PDAs, Wireless sensor network nodes, and even Lego Mindstorms NXT.

Parallel programming

LabVIEW is an inherently concurrent language, so it is very easy to program multiple tasks that are performed in parallel by means of multithreading. This is, for instance, easily done 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 the functionality, a large ecosystem of 3rd party add-ons has developed through 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 e-mail groups and Internet forums.

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 ANSI, IEEE, ISO, etc.

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.[1] There is no LabVIEW 2011 student license for Linux.

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.[2] The use of standard controls requires a run-time library for any language. All major operating systems supply the required libraries for common languages such as C. However, the run-time required for LabVIEW is not supplied with any operating system and has to be specifically installed by the administrator or user. This can cause problems if an application is distributed to a user who may be prepared to run the application but does not have the inclination or permission to install additional files on the host system prior to running the executable.

Race conditions and pseudo parallel execution

The G gives the impression of being a parallel language (cf VHDL) that has modules that run in parallel, however, it is essentially implemented on a non parallel platform without explicit race condition control. While this simplifies programming it gives a false impression of security.[

Performance

LabVIEW makes it difficult to get machine or hardware limited performance and tends to produce applications that are significantly slower than hand coded native languages such as C. This is especially obvious in complex applications involving several pieces of hardware.

Interaction with unsupported hardware

The LabVIEW paradigm is that all hardware comes with LabVIEW drivers which is fine for the end user until they want to drive a piece of hardware which doesn't have a LabVIEW driver.

Light weight applications

Very small applications still have to start the runtime environment which is a large and slow task. This makes writing and running small applications or applications that might run in parallel on the same platform problematic and 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 Mac OS through version 9, Palm OS, and Microsoft Excel (optionally).[3]

Release history

Starting with LabVIEW 8.0, major releases are released around the first week of August, to coincide with the annual National Instruments conference NI Week; followed by a bug-fix release the following February. In 2009 National Instruments names the releases after the year in which they are released. The bug-fix is called a Service Pack (for instance the 2009 service pack 1 is released in February 2010).
Name/VersionBuild NumberDate
LabVIEW project beginsApril 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" capability) ??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.400526 July 2000
LabVIEW 6.16.1.0.400412 April 2001
LabVIEW 7.0 (Express)7.0.0.4000April 2003
LabVIEW PDA module first released ??May 2003
LabVIEW FPGA module first released ??June 2003
LabVIEW 7.17.1.0.40002004
LabVIEW Embedded module first released ??May 2005
LabVIEW 8.08.0.0.4005September 2005
LabVIEW 8.20 (native Object Oriented Programming) ??August 2006
LabVIEW 8.2.18.2.1.400221 February 2007
LabVIEW 8.58.5.0.40022007
LabVIEW 8.68.6.0.400124 July 2008
LabVIEW 8.6.18.6.0.400110 December 2008
LabVIEW 2009 (32 and 64-bit)9.0.0.40224 August 2009
LabVIEW 2009 SP19.0.1.40118 January 2010
LabVIEW 201010.0.0.40324 August 2010
LabVIEW 2010 f210.0.0.403316 September 2010
LabVIEW 2010 SP110.0.1.400417 May 2011
LabVIEW for LEGO MINDSTORMS (2010 SP1 with some modules)August 2011
LabVIEW 201111.0.0.402922 June 2011
LabVIEW 2011 SP111.0.1.40151 March 2012
LabVIEW 201212.0.0.4029August 2012
LabVIEW 2012 SP112.0.1.4013December 2012
LabVIEW 201313.0.0.4047August 2013
LabVIEW 2013 SP113.0.1.4017March 2014[4]
LabVIEW 2014August 2014