The computer establishes a connection with the oscilloscope through the LAN (network port) or USB interface to control the oscilloscope, as shown in Figure 1.
Figure 1 Hardware connection diagram
When we hear about controlling an oscilloscope, we will think of using SCPI commands. So how do we achieve this? The options are:
(1) By writing program code, such as using C, C++, C# and other languages combined with a development environment (such as VS2012);
(2) Implemented through LabVIEW using a graphical interface.
Today we will talk about how to use LabVIEW to control the ZDS2024 oscilloscope.
LabVIEW Definition:
LabVIEW was developed by National Instruments and released its first version in 1986. It is a graphical programming language that uses icons and wires instead of text lines to create applications. LabVIEW provides the syntax functions of a programming language, but it provides them in a graphical way.
LabVIEW is basically composed of VI files. Each VI consists of a front panel and a block diagram. VI files can be understood from two perspectives:
(1) In terms of user interaction, the front panel is responsible for designing the user interaction interface, which is similar to a UI design tool. It generally includes user operation controls and output result controls, such as text boxes, buttons, waveform display controls, etc.; while the flowchart is responsible for processing the user's operations through a series of processes and finally outputting the results, which are displayed on the front panel.
(2) In terms of functional modules, each VI file is similar to a function in C language. The front panel is used to design the function's parameters (input) and return value (output). The flowchart is similar to the function body and implements specific logic.
2. Install software and ZDS2024 driver library
First, you must install LabVIEW and NI-VISA. Copy the ZDS2024 driver library folder Zhiyuan ZDS2000 Series for TCP to the instr.lib directory of the LabVIEW installation directory. Zhiyuan ZDS2000 Series for TCP is for Ethernet connection.
3. Configure NI-VISA to control the oscilloscope
Start the Masurement & Automation Explorer software, select the device and interface, and in the Add Network Device, use the Manual Entry of Raw Scoket method to connect. The ZDS2024 oscilloscope uses port number 5025 to receive SCPI commands. See Figure 2 and Figure 3. After setting, you can test to ensure that the connection is successful.
Figure 2 Connection method
Figure 3 RAW SCOKET configuration
4. Routine design
Start LabVIEW and create a new VI file. Here we take reading data from an oscilloscope and displaying it on a waveform control as an example. The designed VI front panel is shown in Figure 4.
Figure 4 VI front panel
The three controls on the left are used for input settings, including the name of the connected VISA resource, the channel for obtaining data, and the maximum delay time. The right side is the result waveform display control. After designing the front panel, you can enter the program flowchart design. In the Function panel of the VI program flowchart, select "Instrument I/O" to find the module of the driver library of ZDS2024, which can be used directly in the program flowchart. The design result is shown in Figure 5.
Figure 5. Program flowchart
In the program flowchart, the oscilloscope is initialized first and the AutoSetup function of the oscilloscope is started. Then the data of the oscilloscope is acquired in a loop and sent to the display until the user stops or an error occurs during the data acquisition process. Finally, the operation can be started on the front panel. The result is shown in Figure 6.
Figure 6: Operation results
The above is the whole process of using LabVIEW to control the ZDS2024 oscilloscope. Compared with using C or C++ for development, isn’t it much more convenient?
Previous article:What is the relationship between virtual instruments and traditional instruments?
Next article:Development of CAN bus communication platform based on LabVIEW and J1939 protocol
- Popular Resources
- Popular amplifiers
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- In what situations are non-contact temperature sensors widely used?
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- VGA Driver and Implementation.pdf
- STM32SPI interrupt can only accept the first two bytes each time
- Wi-Fi HaLow: Making Smart Homes Even Smarter
- BlueNrg-1 and Raspberry Pi communication abnormality
- 【GD32307E-START】Light up an LED
- 28335 Sampling Problems
- [Evaluation of domestic FPGA Gaoyun GW1N-4 series development board] Time display of dynamic digital tube
- MSP430 Code Examples
- 3C lithium battery development trend
- RP2040 Lightsaber