How to realize remote control of oscilloscope

Publisher:化羽2015Latest update time:2016-10-09 Source: elecfansKeywords:Oscilloscope Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
  1. Introduction to LabVIEW Basics

  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.

How to realize remote control of oscilloscope

  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.

How to realize remote control of oscilloscope

  Figure 2 Connection method
How to realize remote control of oscilloscope

  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.

How to realize remote control of oscilloscope

  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.

How to realize remote control of oscilloscope

  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.

How to realize remote control of oscilloscope

  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?

Keywords:Oscilloscope Reference address:How to realize remote control of oscilloscope

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

Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号