Harness the Power of LabVIEW: A Comprehensive Introduction to Graphical Programming
LabVIEW stands out from the traditional languages like C++ and Visual Basics to provide an elegant and powerful graphical programming based interface to users. LabVIEW as a graphical programming language is quite intuitive and enables users to design sophisticated advanced architectures, tests and control systems. It interfaces with wide variety of hardware devices such as DAQ and GPIB and it is a multiplatform application. We can develop a LabVIEW application on a Windows system, Mac OS, or Linux. Furthermore, we can deploy LabVIEW applications to a variety of real-time and FPGA targets.
LabVIEW as a programming language has many characteristics:
|🡪 Graphical||🡪 Event Driven|
|🡪 Data Flow||🡪 Oriented Multi- threaded|
|🡪 Compiled||🡪 Object Oriented|
|🡪 Multiplatform||🡪 Multi-target|
|🡪 Synchronous||🡪 Memory- Managed|
LabVIEW programs are called virtual instruments or, more commonly, Vis . The VIs have front panels and block diagrams. The front panel is the user interface. The block diagram is the programming behind the user interface. After you build the front panel, you add code using graphical representations of functions to control the front panel objects. The code on the block diagram is graphical code, also known as G code or block diagram code.
We can use multiple VIs together to make a LabVIEW application. To group these application-related VIs together, we use a LabVIEW project. Projects in LabVIEW consist of VIs, files necessary for those VIs to run properly, and supplemental files such as documentation or related links.
Coming on to the parts of an VI. The VI consists of:-
🡪 Front Panel
🡪 Block Diagram
🡪 Connector Pane
The user builds the front panel with controls (inputs) and indicators (outputs). Front panel objects appear as terminals on the block diagram. Icons and connector panes are necessary to use a VI as a subVI.
A subVI is a VI that appears on the block diagram of another VI.
A subVI is similar to a subroutine or function in a text-based programming language.
Controls & Indicators:
|🡪 Input devices||🡪 Output devices|
|🡪 Knobs, buttons, slides||🡪 Graphs, LEDs|
|🡪 Supply data to the block diagram||🡪 Display data from the block diagram|
A front panel window with Controls and Indicators. Controls and Indicators can be of various types such as Boolean, numeric, strings etc. Further numeric consists of Integer data type, Floating data type (single & double precision) as well as fixed point data types. The Boolean data type represents data that has only two options, such as True/False or On/Off. The string data type is a sequence of ASCII characters. Use string controls to receive text from the user, such as a password or user name.
Block Diagram Items
🡪 Free labels
As we can see above Thermometer (Demo).vi represents the SubVI . Delay Multiplier and Stop Button are the control terminals respectively. Temperature Chart represents the indicator terminal and the For Loop here is the structure which we are using to make the VI run for a specified no. of times. And the Multiplication Symbol is known as the Function.
LabVIEW provides and efficient way for new users to get started with it. Tha is new users can access the Context Help Window and LabVIEW Help for further information on Vis and exploring various Vis. LabVIEW VI Contains detailed descriptions and instructions for most palettes, menus, tools, VIs, and functions.
Context Help Window
Displays basic information about wires and nodes when you move the cursor over an object. Can be shown or hidden in the following ways.
🡪 Select Help » Show Context Help from the LabVIEW menu.
🡪 Press <Ctrl-H>.
🡪 Click the following button on the toolbar:
Contains detailed descriptions and instructions for most palettes, menus, tools, VIs, and functions.
Can be accessed by:
🡪 Selecting Help » LabVIEW Help from the menu.
🡪 Clicking the Detailed help link in the Context Help window.
🡪 Right-clicking an object and selecting Help from the shortcut menu.
🡪 LabVIEW includes hundreds of example VIs.
🡪 Use NI Example Finder to browse and search installed examples.
🡪 Select Help » Find Examples in the menu.
Use the NI Example Finder to search all installed examples and examples located in the NI Developer Zone on the web. Modify any example VI to fit an application, or copy and paste from an example into a VI that you create.
For a new user the above guidelines can be very useful to get started on with LabVIEW. Further after learning to implement the Vi the user can use Modular Applications and State machine algorithms to design various systems and architectures.
Blog by Yash Sanjay Kakkad (Intern at Constelli)