“LabVIEW is a programming language oriented to engineers. It adopts graphical programming and runs synchronously with multiple threads. It only needs to be connected to compile software. Provides a wealth of function libraries and controls, and the interface of building software is very fast. A skilled engineer may build a data acquisition system in just a few minutes.
Why Choose LabVIEW for Data Acquisition?
LabVIEW is a programming language oriented to engineers. It adopts graphical programming and runs synchronously with multiple threads. It only needs to be connected to compile software. It provides a wealth of function libraries and controls, and the interface for building the software is very fast. A skilled engineer can build a data acquisition system in just a few minutes.
NI’s data acquisition card provides rich and complete support for LabVIEW. The driver functions are highly encapsulated on the underlying basic functions. Users do not need to have an in-depth understanding of the specific work of the acquisition card. The meaning of the output port can be used for data acquisition and development.
Analog Inputs in LabVIEW
Continuous analog input
It should be noted that the speed of the program reading data should not be slower than the speed at which the device stores data in the buffer, so as to ensure that the data in the buffer will not overflow when running continuously. The above requirements can be achieved by adjusting the following 3 parameters:
number of scans to read at a time
The program model for continuous acquisition is:
Example of continuous analog input program
For some complex acquisition tasks, some special acquisition methods can be used, such as external clock acquisition, trigger acquisition, etc.;
There are many types of trigger acquisition, which can be divided into digital signal trigger and analog signal trigger according to the type of trigger signal; edge trigger and window trigger according to the trigger form; start trigger, pause trigger and reference trigger according to the trigger function;
Not every data acquisition card has these special sampling functions, please check the user manual of the acquisition card before use;
In the analog input acquisition system, the realization of data acquisition is not complicated, but the difficulty is in data processing and analysis.
Analog Output in LabVIEW
Continuous analog output
There are two forms of continuous analog output. The first is to write the digital signal into the buffer before the analog output, and then the device continuously repeats the data in the buffer through the DAC. This kind of continuous mode output is very efficient, but the digital signal to be written must be a full cycle, otherwise the output analog signal will be discontinuous and not flexible enough to use.
The second method is to continuously write digital signals into the buffer while the device outputs the data in the buffer. This method is more complicated in programming, but more flexible, as long as it is guaranteed to write to the buffer this time. The digital signal and the last time are continuous, and the signal does not need to be a full cycle every time.
Digital I/O in LabVIEW
In general, digital I/O is designed according to TTL logic level, its logic low level is between 0 and 0.7V, and its high level is between 3.4 and 5.0V;
On hardware devices, a group of multiple (Line) digital I/Os is called a port. How many digital channels a port consists of depends on its equipment, in most cases 8 digital channels constitute a port;
The operation of digital I/O in LabVIEW is very simple. You can operate on the entire port, and you can also operate on one or more of the ports at the same time.
Counters in LabVIEW
The figure above is a simplified model of the counter: a SOURCE input port, a GATE input port, an OUT output port, and a count register.
It can be set to count the signal state of the SOURCE input port from high to low or from low to high; the counting method of the internal count register can be set to increment or decrement;
The input of the GATE port controls the counting operation of the counter, which can be set to the following threshold operation modes: high-level counting, low-level counting, rising edge triggering counting, falling edge triggering counting, and no threshold mode;
The OUT port can be used to generate various types of waveforms, or used in the cascade use of the counter, thereby increasing the range of the counter.
Frequency measurement of counters
Schedule processing in parallel
Functions such as analog input, analog output, digital I/O, and counters on a multifunction DAQ device are capable of running simultaneously, and these functions can be scheduled in parallel in a program and synchronized.
As shown in the figure below, it is a program of continuous acquisition and continuous analog output arranged in parallel, using the data line that transmits error information to arrange the parallel execution sequence.