LabVIEW is termed as Laboratory Virtual Instrument Engineering Workbench. It is a visual/graphical programming language used by engineers, scientists, and professionals to build systems faster. It is developed by National Instruments to verify instruments. However, the scope of LabVIEW has spread well across system design and operations as well. To use LabVIEW, you need a license, although trial and student packages are there for free us.
LabView Programming-Table of Contents
Applications built using LabVIEW are also known as VI (Virtual Instrument). These application files have *.vi as their extension. LabVIEW provides in-built development, test, and run environment for applications to be developed, tested and run. LabVIEW’s graphical data flow language is sometimes referred as “G” as well. In LabVIEW, applications are developed using icons instead of lines of codes. Here, dataflow will determine the execution sequence of VIs and functions. LabVIEW acquires, analyze, stores, displays and troubleshoots the data as and when required.
If you would like to Enrich your career with an Android certified professional, then visit Mindmajix - A Global online training platform: “LabVIEW training” Course. This course will help you to achieve excellence in this domain.
Modular programming is a process of dividing a program or a module into separate and small sub-modules. Here a sub-module is a independent software code or function which can be used and integrated within various other applications with other different system components. Due to this, a module can be re-used wherever required.
Let us explore few examples to understand the need of modular programming approach.
[Related Article:-Labview Structure
While implementing module approach in your applications, you should consider below points to have a perfect architecture for your application.
Almost all the programming languages prefer modular approach while using it. Do you want to know why? Below are the advantages of using it.
LabVIEW implements modular approach in programs by using subVI.
A VI is a LabVIEW program. A VI which is used in another VI is called subVI. A subVI is nothing but the reusable code. The subVI will be inserted into the block diagram of another VI. For feeding data to subVI, icon for subVI uses terminals for their corresponding inputs and outputs. Block diagram and front panel of subVI can be accessed by double-clicking on the subVI icon.
[Related Article:- LabView Basics]
Let us see how can create and use subVI in another VI. Below are some mandatory things to check while working with subVI.
Below is the sample diagram which depicts how subVI is a life savior for LabVIEW. We can simplify different sections into a subVI and use it instead of mentioning all the sections in the single VI.
We can choose sections of the block diagram which we want to convert and then click on Edit????Create subVI from Tools menu. The selected section of diagrams will be replaced with subVI icon. LabVIEW itself generates indicators and controls for subVI. It automatically configures the connector pane based on the number of control and indicator terminals you selected and wires the SubVI to the existing wires.
To differentiate subVI from other icons, it is advisable to change the icon for subVI. We can change the icon for subVI with whatever custom icon we want to use. For example, subVI icon is changed to below customized icon.
For reusing the subVI, you need to save this subVI. To add this subVI in another VI, right click on the block diagram of VI and click “Select a VI”. Browse to the folder where you have saved the subVI file and select the same. It will add subVI into your VI’s block diagram. Configure the way you want to use it.
Below are some generic steps to create subVI and use it in another VI.
LabVIEW is an interactive, easy-to-use graphical programming language which is ideal for engineers and scientists. Whether you are a professional or a student, LabVIEW programming is valuable and must to have skill with many benefits. Applying modular programming in LabVIEW makes programming very easy and fast for beginners.
Our work-support plans provide precise options as per your project tasks. Whether you are a newbie or an experienced professional seeking assistance in completing project tasks, we are here with the following plans to meet your custom needs:
Name | Dates | |
---|---|---|
LabVIEW Training | Nov 26 to Dec 11 | View Details |
LabVIEW Training | Nov 30 to Dec 15 | View Details |
LabVIEW Training | Dec 03 to Dec 18 | View Details |
LabVIEW Training | Dec 07 to Dec 22 | View Details |
Ravindra Savaram is a Technical Lead at Mindmajix.com. His passion lies in writing articles on the most popular IT platforms including Machine learning, DevOps, Data Science, Artificial Intelligence, RPA, Deep Learning, and so on. You can stay up to date on all these technologies by following him on LinkedIn and Twitter.