📜 ⬆️ ⬇️

A new kind of lab or familiarity with LabView

At present, the use of computers in scientific research is not limited to simulation modeling based on mathematical models. We have long been accustomed to the fact that a computer is used to receive, process and analyze signals from real physical objects and control them. In this case, there is a need for electrical sensors, signal converters and special software. All these elements occupy a large space and require secondary transformations and signal processing. In addition, additional calculations and calculations are required, for example, to determine the error of instruments during calibration, recalculation of physical parameters of media, etc.

To simplify routine operations when calibrating instruments and when retrieving data from various sensors can hardware-software complexes (AIC), the miracle of Hungarian genius based on LabView environment I would like to share my experience got into my hands. It looks like this:


image
')
Here we see a small-diameter oil mass flow meter with a current output (on the left), a laptop with a program (on the right) and the LabView hardware (blue blocks with a white page behind a laptop).

The LabVIEW programming environment is a hardware-software complex for developing applications of graphical “algorithmic-block” type, which allow interrogating sensors installed at the research object, processing the received information, generating signals for its control in the 60 V range (from –30V to +30 V). for alternating signals, from 0 to 60 V for unipolar). LabView used the technology of virtual measuring devices (VP), that is, when operating a small base of VIs, you can reuse the same components of virtual devices without acquiring additional hardware, software, and without repeating the routine that increases the code.

The hard-ware part represents various interface devices embedded in a computer or connected to its ports, devices for generating and processing real electrical signals, sensors recording various physical processes, etc., which have a universal interface and can interact with various hardware and operating systems. systems. I got into the hands of the desktop version with three modules - voltage, current and combined.

As far as I was able to determine, the APK has support for many devices, that is, it is not necessary, as usual, to write drivers and data transfer protocols (RS-232, GPIB 488, TCP / IP, etc.), and accordingly to debug communication algorithms , to introduce entropy, etc ... As for the cross-platform, then I managed to fully work with the APK on MacOS and on Windows7, I could not test on Linux and Solaris.

Virtual Instruments written in this environment simulate real physical instruments. For example, I measured the temperature of an object, turned on a cooler or heaters.

On the basis of the LabView environment, I developed a complex for working with measuring instruments that have analog or digital outputs. For analog outputs it is possible to work with both current and voltage outputs. Appearance of the front panel control output values:

Front panel analog input

The panel simultaneously displays the signal level, flow rate, accumulated volume from the start of the test, the largest and smallest flow rates, the flow deviation from the average, and the graph, which makes it possible to monitor the pulsations during the measurement. I used ready-made blocks for statistical analysis, the benefit of their large number in the package.

The block diagram of this virtual device, which is the program itself:

Analog Input Block Diagram


If it is necessary to correct or add new functions, it is enough for the operator to add a small block, for example, in order to add error control in real time in the measurement process, it is enough to add a block to the Diagram:

Error calculation

This virtual device does not necessarily reproduce each time for each channel, you can simply use it as a ready Sub - device and get the already processed values, and only those that are necessary. For one data acquisition channel, the diagram of the same device will look like this:

Abbreviated device with sub-device

To increase the number of devices or channels from which a signal is being received, it will suffice to copy the required number of times the three objects on the left side of the diagram.
Virtual device for processing digital output data:

Pulse processing

And his program looks like this:

Pulse processing block diagram

The versatility of these virtual instruments allows you to combine them into one set within a few minutes with a few mouse clicks. You can simultaneously use the outputs for voltage, current, pulse outputs using these two programs. Thus, we get the replacement of 27 real devices using only three modules and two programs. I can add that programs can be compiled into executable files, in * .exe, in * .app, etc., There are even options with an independent system, that is, without using a computer, but with a self-contained module, for example, some touchscreen and your favorite controllers, but I haven't gotten to that test until ...

Source: https://habr.com/ru/post/114131/


All Articles