ArticleslgStudy

computer science

LabVIEW

LabVIEW is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand LabVIEW rather than just read about it. In short: Laboratory Virtual Instrument Engineering Workbench (LabVIEW) is a graphical system design and development platform produced and distributed by National Instruments, based on a programming environment that uses a visual programming language. It is widely used for data acquisition, instrument control, and industrial automation.

LabVIEW — main illustration
LabVIEW — illustration

Key takeaways

  • LabVIEW belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect LabVIEW to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of LabVIEW from memory before moving on to harder problems.

Reference excerpt

Laboratory Virtual Instrument Engineering Workbench (LabVIEW) is a graphical system design and development platform produced and distributed by National Instruments, based on a programming environment that uses a visual programming language. It is widely used for data acquisition, instrument control, and industrial automation. It provides tools for designing and deploying complex test and measurement systems. The visual (aka graphical) programming language is called "G" (not to be confused with G-code). It is a dataflow language originally developed by National Instruments. LabVIEW is supported on a variety of operating systems (OSs), including macOS and other versions of Unix and Linux, as well as Microsoft Windows. The latest versions of LabVIEW are LabVIEW 2024 Q3 (released in July 2024) and LabVIEW NXG 5.1 (released in January 2021). National Instruments released the free for non-commercial use LabVIEW and LabVIEW NXG Community editions on April 28, 2020.

Dataflow programming

The programming paradigm used in the LabVIEW "G" language is based on data availability. If there is enough data available to a function, it will execute. The execution flow is determined by the structure of a graphical block diagram (the LabVIEW-source code) on which the programmer places nodes and connects them by drawing wires. A node can be a control, indicator, structure, function, or recursively, another block diagram. An example of a simple four-node block diagram is two controls and an indicator wired to the addition function, causing the indicator to display the sum of the two controls. The wires connecting nodes propagate data as variables, and any node can execute as soon as all its input variables (data) become available. Since this might be the case for multiple nodes simultaneously, LabVIEW can conceptually execute 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 program development cycle. LabVIEW programs are collections of one or more virtual instruments (VIs). Each VI has three components, a front panel, back panel, and connector panel, all composed of nodes and wires represented graphically to the user. 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 consists of a block diagram containing the graphical source code. All of the objects placed on the front panel will appear in the back panel block diagram as terminals. The block diagram also contains structures and functions, chosen from a Functions palette, which perform operations on controls and supply data to indicators. The connector panel has terminals whose wires go to or come from nodes in the front and back panels, and is used to represent the VI within the back panel of upstream (calling) VIs and downstream (called) VIs to which it might be connected. There are two ways to run a VI. It can be run by itself as a program, with the front panel serving as a user interface. Alternatively, it can be treated as a node that is dropped onto the block diagram of another VI and wired to its nodes through the connector panel. In that case it runs as a subroutine within a larger program, and the front panel controls the inputs and outputs of the VI node. Thus, each VI can be easily tested as a stand-alone program before being embedded as a subroutine into a larger program. The "G" graphical approach allows non-programmers to easily build programs by dragging and dropping virtual representations of lab equipment with which they are already familiar. The LabVIEW programming environment includes examples and documentation to guide and simplify the creation of small applications. As with all introductory programming guides, the ease of construction of working "G" programs may cause the programmer to underestimate the expertise needed for high-quality "G" programming. For complex algorithms or large-scale code, a programmer must possess 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 that communicate using a simple client–server model which takes advantage of the inherently parallel nature of "G".

Common application design patterns Applications in LabVIEW are typically designed using well-known architectures known as design patterns. The most common design patterns for graphical LabVIEW applications are listed in the table below.

Features and Resources

Interfacing to devices LabVIEW includes extensive support for interfacing to 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 "G" function nodes for controlling the device. National Instruments makes thousands of device drivers available for download on their Instrument Driver Network (IDNet). LabVIEW has built-in support for other National Instruments products, such as the CompactDAQ and CompactRIO hardware platforms and Measurement and Automation eXplorer (MAX) and Virtual Instrument Software Architecture (VISA) toolsets.

… excerpt ends here. Continue reading the full article.

Illustrations

LabVIEW: An example of LabVIEW code
An example of LabVIEW code

Worked examples

Example 1 — a first encounter with LabVIEW

Start with the simplest possible case. Write down what LabVIEW claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to LabVIEW before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about LabVIEW ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of LabVIEW

In research
LabVIEW appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses LabVIEW in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
LabVIEW is common in secondary-school and first-year university syllabi. It links to neighbouring topics Cross-platform software, Node-graph-based visual programming languages, Numerical analysis software for Linux, so understanding it makes those chapters shorter.
In everyday life
Look for LabVIEW outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study LabVIEW in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what LabVIEW means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain LabVIEW out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is LabVIEW in simple terms?

Laboratory Virtual Instrument Engineering Workbench (LabVIEW) is a graphical system design and development platform produced and distributed by National Instruments, based on a programming environment that uses a visual programming language. It is widely used for data acquisition, instrument contro…

Why does LabVIEW matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study LabVIEW?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on LabVIEW.

Tags

  • Cross-platform software
  • Node-graph-based visual programming languages
  • Numerical analysis software for Linux
  • Numerical analysis software for Windows
  • Numerical analysis software for macOS
  • Numerical programming languages
  • Numerical software
  • Pedagogic integrated development environments
  • Programming languages supporting units of measure
  • Software modeling language
  • Synchronous programming languages

Keep exploring