Вы находитесь на странице: 1из 8

LabVIEW

From Wikipedia, the free encyclopedia

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 Gcode). 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 2013, released in August 2013.

LabVIEW

Developer(s) Stable release

National Instruments 2012 / August 3, 2012

Operating system Cross-platform: Windows, Mac OS X, Linux Type Data Acquisition, Instrument Control, Test Automation, Analysis and Signal Processing, Industrial Control, Embedded Design Proprietary ni.com/labview (http://www.ni.com/labview/)

Contents
1 Dataflow programming 2 Graphical programming 3 Benefits 3.1 Interfacing 3.2 Code compilation 3.3 Large libraries 3.4 Code re-use 3.5 Parallel programming 3.6 Ecosystem 3.7 User community 4 Criticism 4.1 Licensing 4.2 Runtime environment 4.3 Copyright notice 4.4 Formal testing 5 Timing system 6 Release history 7 Repositories and libraries 8 Related software 9 See also 10 References 11 Further reading 11.1 Articles on specific uses 11.2 Articles on education uses 12 External links
License Website

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 LV-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 executions.

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 Screenshot of a simple LabVIEW are found on the Functions palette and can be placed on the back panel. program 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 panel. 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. The image above is an illustration of a simple LabVIEW program showing the dataflow source code in the form of the block diagram in the lower left frame and the input and output variables as graphical objects in the upper right frame. The two are the essential components of a LabVIEW program referred to as a Virtual Instrument.

Benefits
Interfacing

A key of LabVIEW over other development environments 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[citation needed ].

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 textbased 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[citation needed ].

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 sub VIs 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 or VxWorks 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, and 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.

Runtime environment
Compiled executables produced by all newer versions of the Application Builder (since version 6.0) are not truly standalone in that they also require that the LabVIEW run-time engine be installed on any target computer on which users run the application.[2] The use of standard controls requires a runtime library for any language and all major operating system suppliers supply the required libraries for common languages such as C. However, the runtime required for LabVIEW is not supplied with any operating system and is required to be specifically installed by the administrator or user. This requirement 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.

Copyright notice
According to the National Instruments license agreement an executable built with LabVIEW should contain a note that the software is written in LabVIEW.[3]
1.) You include the following copyright notice "Copyright [insert year] National Instruments Corporation. All Rights Reserved." in (a) the Authorized Applications About Box (if applicable) and (b)(i) any applicable written documentation or, (ii) if no such documentation exists, in a "read me" or other .txt file distributed with each copy of the Authorized Application (you may include your own copyright notice with the notice(s) required above).

There is some debate as to whether LabVIEW is really a general purpose programming language (or in some cases whether it is really a programming language at all) as opposed to an application-specific development environment for measurement and automation.[4] Critics point to a lack of features, common in most other programming languages, such as, until version 2009, native recursion and, until version 8.20, native object oriented features.

Formal testing
For an environment targeted for repetitive application, especially in process automation, LabVIEW includes no built-in functions for formally testing limits, reading a limits file, and conveniently tracking the passing or failing results. Due to such constraints in effect with formal and dynamic testing, the recommended usage potentially will not cover the required scope for production or therapy processes, especially when these are subject of risk and security auditing, e.g. according to FDA 21 C.F.R. 820 et seq.[5] Companies tend to build their own proprietary functions for this basic feature if they choose not to use National Instruments' product line TestStand.

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).[6]

Release history
Starting with LabVIEW 8.0, a minor release is released around the first week of August to coincide with the National Instruments conference NI Week, followed by a bug-fix release in 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/Version LabVIEW project begins LabVIEW 1.0 (for Macintosh) LabVIEW 2.0 LabVIEW 2.5 (first release for Sun & Windows) LabVIEW 3.0 (Multiplatform) LabVIEW 3.0.1 (first release for Windows NT) LabVIEW 3.1 LabVIEW 3.1.1 (first release with "application builder" capability) LabVIEW 4.0 LabVIEW 4.1 LabVIEW 5.0 LabVIEW RT (Real Time) LabVIEW 6.0 (6i) LabVIEW 6.1 LabVIEW 7.0 (Express) LabVIEW PDA module first released LabVIEW FPGA module first released LabVIEW 7.1 LabVIEW Embedded module first released LabVIEW 8.0 LabVIEW 8.20 (native Object Oriented Programming) LabVIEW 8.2.1 LabVIEW 8.5 LabVIEW 8.6 LabVIEW 8.6.1 LabVIEW 2009 (32 and 64-bit) LabVIEW 2009 SP2 LabVIEW 2010 LabVIEW 2010 f2 LabVIEW 2010 SP1 LabVIEW for LEGO MINDSTORMS (2010 SP1 with some modules) LabVIEW 2011 LabVIEW 2011 SP1 LabVIEW 2012 LabVIEW 2012 SP1 LabVIEW 2013 11.0.0.4029 11.0.1.4015 12.0.0.4029 12.0.1.4013 13.0.0.4047 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 6.0.0.4005 6.1.0.4004 7.0.0.4000 ?? ?? 7.1.0.4000 ?? 8.0.0.4005 ?? 8.2.1.4002 8.5.0.4002 8.6.0.4001 8.6.0.4001 9.0.0.4022 9.0.1.4011 10.0.0.4032 10.0.0.4033 10.0.1.4004 Build Number Date April 1983 October 1986 January 1990 August 1992 July 1993 1994 1994 1995 April 1996 1997 February 1998 May 1999 26 July 2000 12 April 2001 April 2003 May 2003 June 2003 2004 May 2005 September 2005 August 2006 21 February 2007 2007 24 July 2008 10 December 2008 4 August 2009 8 January 2010 4 August 2010 16 September 2010 17 May 2011 August 2011 22 June 2011 1 March 2012 August 2012 December 2012 August 2013

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.[7]

Related software
National Instruments also offers a product called Measurement Studio, which offers many of the test, measurement and control capabilities 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 require 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 into LabVIEW for scripting.[8] 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
Comparison of numerical analysis software Dataflow programming DRAKON Fourth-generation programming language Graphical programming Graphical system design LabWindows/CVI Lego Mindstorms NXT, whose programming environment, NXT-G is based on LabVIEW, and can be programmed within LabVIEW. MATLAB/Simulink Virtual instrumentation

References
1. ^ "Building a Stand-Alone Application" (http://zone.ni.com/reference/en-XX/help/371361B01/lvhowto/building_a_stand_alone_app/). National Instruments. 2. ^ "Using the LabVIEW Run-Time Engine" (http://zone.ni.com/reference/en-XX/help/371361B01/lvhowto/using_the_lv_run_time_eng/). National Instruments. 3. ^ http://www.ni.com/pdf/legal/us/software_license_agreement.pdf 4. ^ Is LabVIEW a general purpose programming language? (http://zone.ni.com/devzone/cda/tut/p/id/5313) 5. ^ Best Practices When Developing with NI LabVIEW for FDA-Validated Medical Devices (http://zone.ni.com/devzone/cda/pub/p/id/364#toc4) 6. ^ Spolsky, Joel. "Why are the Microsoft Office file formats so complicated? (And some workarounds)" (http://www.joelonsoftware.com/items/2008/02/19.html). Retrieved March 8, 2009.

7. ^ https://decibel.ni.com/content/docs/DOC-13859 8. ^ Embedding a C/C++ Interpreter Ch into LabVIEW for Scripting (http://iel.ucdavis.edu/projects/chlabview/)

Further reading
Peter A. Blume: The LabVIEW Style Book , February 27, 2007, Prentice Hall. Part of the National Instruments Virtual Instrumentation Series series. ISBN 0-13-145835-3 Jeffrey Travis, Jim Kring: LabVIEW for Everyone: Graphical Programming Made Easy and Fun, 3rd Edition, July 27, 2006, Prentice Hall. Part of the National Instruments Virtual Instrumentation Series. ISBN 0-13-185672-3

Articles on specific uses


Desnica V, Schreiner M, Vladan; Schreiner, Manfred (October 2006). "A LabVIEW-controlled portable x-ray fluorescence spectrometer for the analysis of art objects" (http://www3.interscience.wiley.com/cgibin/abstract/112748693/ABSTRACT). X-Ray Spectrometry 35 (5): 280286. doi:10.1002/xrs.906 (http://dx.doi.org/10.1002%2Fxrs.906). Keleshis C, Ionita C, Rudin S, C; Ionita, C; Rudin, S (June 2006). "Labview [sic] graphical user interface for micro angio-fluoroscopic high resolution detector" (http://scitation.aip.org/getabs/servlet/GetabsServlet? prog=normal&id=MPHYA6000033000006002007000001&idtype=cvips&gifs=Yes). Medical Physics 33 (6): 2007. doi:10.1118/1.2240285 (http://dx.doi.org/10.1118%2F1.2240285). Fedak W, Bord D, Smith C, Gawrych D, Lindeman K, W.; Bord, D.; Smith, C.; Gawrych, D.; Lindeman, K. (May 2003). "Automation of the Franck-Hertz experiment and the Tel-X-Ometer x-ray machine using LABVIEW" (http://scitation.aip.org/getabs/servlet/GetabsServlet? prog=normal&id=AJPIAS000071000005000501000001&idtype=cvips&gifs=Yes). American Journal of Physics (AAPT) 71 (5): 501506. doi:10.1119/1.1527949 (http://dx.doi.org/10.1119%2F1.1527949).

Articles on education uses


Belletti A, Borromei R, Ingletto G, A.; Borromei, R.; Ingletto, G. (September 2006). "Teaching physical chemistry experiments with a computer simulation by LabVIEW" (http://jchemed.chem.wisc.edu/Journal/Issues/2006/Sep/abs1353.html). Journal of Chemical Education (ACS) 83 (9): 13531355. doi:10.1021/ed083p1353 (http://dx.doi.org/10.1021%2Fed083p1353). Moriarty PJ, Gallagher BL, Mellor CJ, Baines RR, P. J.; Gallagher, B. L.; Mellor, C. J.; Baines, R. R. (October 2003). "Graphical computing in the undergraduate laboratory: Teaching and interfacing with LabVIEW" (http://scitation.aip.org/getabs/servlet/GetabsServlet? prog=normal&id=AJPIAS000071000010001062000001&idtype=cvips&gifs=Yes). American Journal of Physics (AAPT) 71 (10): 10621074. doi:10.1119/1.1582189 (http://dx.doi.org/10.1119%2F1.1582189). Lauterburg, Urs (June 2001). "LabVIEW in Physics Education" (http://www.lauterburg.ch/UrsLPublications/LVPhysicsWPPrint.pdf) (PDF). A white paper about using LabVIEW in physics demonstration and laboratory experiments and simulations. Drew SM, Steven M. (December 1996). "Integration of National Instruments' LabVIEW software into the chemistry curriculum" (http://jchemed.chem.wisc.edu/Journal/Issues/1996/Dec/abs1107.html). Journal of Chemical Education (ACS) 73 (12): 11071111. doi:10.1021/ed073p1107 (http://dx.doi.org/10.1021%2Fed073p1107). Muyskens MA, Glass SV, Wietsma TW, Gray TM, Mark A.; Glass, Samuel V.; Wietsma, Thomas W.; Gray, Terry M. (December 1996). "Data acquisition in the chemistry laboratory using LabVIEW software" (http://jchemed.chem.wisc.edu/Journal/Issues/1996/Dec/abs1112.html). Journal of Chemical Education (ACS) 73 (12): 11121114. doi:10.1021/ed073p1112 (http://dx.doi.org/10.1021%2Fed073p1112). Ogren PJ, Jones TP, Paul J.; Jones, Thomas P. (December 1996). "Laboratory interfacing using the LabVIEW software package" (http://jchemed.chem.wisc.edu/Journal/Issues/1996/Dec/abs1115.html). Journal of Chemical Education (ACS) 73 (12): 11151116. doi:10.1021/ed073p1115 (http://dx.doi.org/10.1021%2Fed073p1115). Trevelyan, J.P. (June 2004). "10 Years Experience with Remote Laboratories" (http://telerobot.mech.uwa.edu.au/Information/Trevelyan-INEER-2004.pdf) (PDF). International Conference on

Engineering Education Research (ACS).

External links

Official Home Page (http://www.ni.com/labview/) - The National Instruments web site for the LabVIEW product line. LabVIEW Tools Network (http://www.ni.com/labviewtools) - Ecosystem of LabVIEW Add-on products, contributed by NI and the community. LabVIEW Help (http://zone.ni.com/reference/en-XX/help/371361J-01/) - NI's entire set of online help documentation for LabVIEW 2012. LabVIEW Help (http://zone.ni.com/reference/en-XX/help/371361G-01/) - NI's entire set of online help documentation for LabVIEW 2010. LabVIEW Help (http://zone.ni.com/reference/en-XX/help/371361F-01/) - NI's entire set of online help documentation for LabVIEW 2009. LabVIEW Help (http://zone.ni.com/reference/en-XX/help/371361B-01/) - NI's entire set of online help documentation for LabVIEW 8.20. Official LabVIEW Community Home Page (http://www.ni.com/labviewzone) - NI's "LabVIEW Zone" web site. LAVA (LabVIEW Advanced Virtual Architects) (http://lavag.org/) - Independent community, with discussion forums and a code repository. Info-LabVIEW (http://www.info-labview.org) - A LabVIEW electronic mailing list OpenG (http://sourceforge.net/projects/opengtoolkit/?source=directory) - Open-source LabVIEW utilities. The LabVIEW Wiki (http://labviewwiki.org/) - A user editable LabVIEW knowledge base powered by MediaWiki. Free, online LabVIEW programming course (http://cnx.org/content/col10241/latest/) - This course was authored by NI, and is hosted by Connexions. International multi-language (mostly Russian and German) forum and site dedicated to LabVIEW (http://www.labviewportal.eu/) ITpointed LabVIEW Forum (http://itpointed.com/) Dutch-language based user group dedicated to LabVIEW (http://www.lvug.nl/) LabVIEW Turkey Project Community (http://www.lab-view.com/) - Turkish Italian LabVIEW user Group (http://www.ilvg.it/) - Italian LabVIEW link collection: tutorials, blogs, toolkits, hardwares (http://labview.lap.hu/) Retrieved from "http://en.wikipedia.org/w/index.php?title=LabVIEW&oldid=571338401" Categories: Numerical software Visual programming languages Numerical programming languages Linux numerical analysis software Cross-platform software Pedagogic integrated development environments Synchronous programming languages This page was last modified on 3 September 2013 at 05:52. Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.

Вам также может понравиться