LabVIEW - Virtual instrumentation Basics

What is LabVIEW?

LabVIEW (Laboratory Virtual Instrument Engineering Workbench) is a tool specially designed to monitor, control, automate and perform complex calculations of analog and digital signals captured through data acquisition cards, serial ports and GPIBs (General Purpose Exchange Buses).

It is a general-purpose programming language, such as Language C or Basic, but with the characteristic that is totally graphic, thus facilitating the understanding and use of this language for the SCADA designer and programmer of applications.

It includes libraries for the acquisition, analysis, presentation and storage of data, GPIB and serial ports. In addition to other features, such as connectivity with other programs, for example, calculation, and especially MatLAB.

Features of LabVIEW:

  • It is based on modular programming, which allows creating very complicated tasks from modules or sub-modules much simpler. In addition, these modules can be used in other tasks, which allows a faster and more profitable programming.

  • LabVIEW is a completely graphic language, and the result of this is that it is totally similar to an instrument, that is why all the modules created with LabVIEW are called VI (Virtual Instrument). There are two basic concepts in LabVIEW, the Front Panel (Front Panel) and the Block diagram.

  • The Front Panel is the interface that the user is seeing and can be totally similar to the instrument from which the data is being collected, in this way the user knows precisely what is the current state of said instrument and the values of the signals that are being measured.

  • The block diagram is the connection of all the controls and variables, which would have a certain resemblance to the schematic diagram electric instrument.

  • It also offers the advantage of “debugging” at any point of the application. It allows the possibility of putting “break points”, execution step by step, execution up to a certain point and you can see how the data is taking values as the application is running. It also has built-in signal generators to make a simulator.

  • LabVIEW has the modular decomposition feature since any VI that has been designed can easily be converted into a module that can be used as a sub-unit within another VI. This peculiarity could be compared to the procedural characteristic in structured programming languages.

  • It is an open system, in that any manufacturer of data acquisition cards or instruments, in general, can provide the driver of your product in the form of VI within the LabVIEW environment.

  • It is also possible to program modules for LabVIEW in languages such as C and C ++, these modules are known as Sub-VIs and do not differ from the VI created with LabVIEW except for the language interface in which they were programmed. In addition these Sub-VIs are very useful for example in the field of complex numerical calculations that are not included in the libraries of LabVIEW.

The Front panel and the Block diagram:

It could be said that in any VI there are two well-differentiated faces: The Front Panel and the Block Diagram.

The Front Panel is the fact that the user of the system is seeing when the system is being monitored or controlled, that is, the user interface. It contains controls and indicators and there is a wide variety of them, but in addition, you can even design customized controls and indicators, which allows having a wide range of these controls and indicators. The figure below shows the front panel:

The VI Block Diagram would be the hidden face of the Front Panel, a face that the system user can not see. In it are all the interconnected controls and indicators, much like an electrical diagram. This face is much less conceptual than the Front Panel and for the user, it would be very difficult to understand it. The following Figure below is the block diagram:

We can see how all the modules are interconnected, through connection lines, where the different data or values ​​of the VI circulate. This way, the VI works as a set of elements, modules and sub-modules.

A control can take many forms, and many of these forms the actual drawing used in real instruments. Others are strictly digital or analog concepts. But all the controls have a visual form that indicates to the user what the status of said control is in the real instrument. It is very important in a SCADA system that the user does not have to interpret anything, but everything is clear and concise, the interpretations can give rise to false actions and, consequently, there could be regrettable mistakes. In addition, two users could interpret any event differently.