Simplify oscilloscope operation with a custom user interface or test automation capabilities

Publisher:superstar10Latest update time:2023-10-04 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Today's digital oscilloscopes offer an impressive suite of acquisition, measurement and analysis tools for engineers and technicians to carry out testing. Even so, there are situations where you want batch setup and automation, especially for those who only need simple or repetitive measurements. Oscilloscopes let you customize their operation, limiting the instrument's functionality to a few selected tests or semi-automating these tests. Here are some examples of leveraging custom user interfaces or test automation features to help achieve this.


●You need to simplify oscilloscope operation to allow inexperienced users to perform repeatable tests.

●You need to automate a series of tests without connecting the instrument to a controller or automated test system.

●You need to use special programs or algorithms to analyze or measure the collected data.

●The collected waveforms need to be processed faster than sending the data to an external computer.


Simplified setup and testing process

Different oscilloscope manufacturers may offer different paths to customization. The Teledyne LeCroy HDO6054 oscilloscope I use uses a feature called CustomDSO, which can display user-configurable buttons on the display to invoke desired operations, or replace the default user interface with a customized graphical user interface (GUI). Another oscilloscope manufacturer offers the ability to program existing user interfaces to remove or limit selected features, thereby simplifying instrument operation. Some manufacturers also offer the ability to program macros based on a series of stored panel settings. You can program a series of settings that make up a target test element. In some cases, you can even program dynamic operations.

All digital oscilloscopes have the ability to store and recall panel settings. This feature allows you to set up the instrument and save the settings for later use, or for less experienced users. These stored settings can be recalled at any time as needed. Basic mode CustomDSO (optional on some models) extends this functionality by allowing you to link multiple setup files into an ordered test sequence, and invoke a test at the click of a user-defined button. The settings being called can themselves also contain calls to other settings, thus allowing you to create multi-level tests. Figure 1 shows an example of a basic mode CustomDSO application that automates the setup of SPI low-speed serial interface testing.

Simplify oscilloscope operation with a custom user interface or test automation capabilities

Figure 1: Example of CustomDSO button strip with SPI test selected. Up to 8 buttons can be defined, each button calling a specific test setup.


Each of the 8 buttons located at the bottom of the display was created with CustomDSO, and each button can be set up for a specific test. Operator prompts can be inserted using tracking tags. In Figure 1, only 5 buttons are assigned. Pressing any button brings up an additional set of similar buttons that guide the user through the test.


Figure 2 shows the CustomDSO settings menu. In basic mode, each of up to 8 CustomDSO buttons is associated with an oscilloscope setup file. The root part of the file name is assigned the button label. In this example, button 3 will call the settings file named "SPI Decode Table.lss", and the button's label is SPI Decode Table. The panel setup file in this oscilloscope is actually a VB (Visual Basic) script that defines the instrument status. These settings files each contain additional CustomDSO button definitions, so multiple settings files can be linked together and called in multiple topologies.

Figure 2: CustomDSO settings file shows that the settings file "SPI Decode Table" is associated with button 3. Pressing this button will execute the corresponding setup file and set the oscilloscope to the desired settings. It can also bring up other CustomDSO buttons for additional testing.


In addition, panel setup files can contain dynamic actions that automate oscilloscope operation.

Note that there are two operating modes for CustomDSO in the CustomDSO description box shown in Figure 2 (shown on the left). The second mode is "plug-In", which is a more powerful mode that allows you to add your own ActiveX controls to the settings file. These controls are defined by routines written in VB, Visual C++, or other ActiveX-compatible programming languages. With ActiveX controls, you can create your own customized user interface. There are a large number of interactive components available, including buttons, check boxes, radio buttons, list boxes, picture boxes, and regular dialog boxes. Figure 3 shows an example of a plug-in GUI using two push buttons. The first button is Single Trigger, which starts a single acquisition. The second button sends the waveform in channel 1 (C1) to waveform memory M1, and then sequentially transfers it from M1 to M2, M2 to M3, and M3 to M4, effectively moving the previously stored waveform through the existing waveform memory. This latter function would require almost 12 button presses if done manually.

Figure 3: CustomDSO PlugIn example for creating user-defined graphical user interfaces. The interface contains buttons, check boxes, radio buttons, list boxes, picture boxes and ordinary dialog boxes.


VB script

In this type of oscilloscope, the setup file is an ASCII text file that contains a complete VB script "program" that, when executed, restores the instrument to its previously recorded state. In fact, every time you save a panel, the instrument will help you write a program that will return the instrument to the saved state when the program is executed.


In addition to calling setup states, VB scripts can be used to create programs that control the oscilloscope using standard remote commands. You can "automate" oscilloscope operation from a setup file that runs internally.


For example, you could write a VB script that moves the center of a zoomed waveform to a location determined by the cursor. In fact, the zoomed waveform will follow the cursor position. Listing 1 shows this script. The script file is saved with the same suffix as the settings file (.lss) and is run by calling the panel settings or linking it to a CustomDSO button. By using VB scripts combined with CustomDSO, you can write highly interactive tests. Figure 4 shows the CustomDSO used to run VB scripts.


Listing 1: VB script (zoom_trac.lss) to zoom the center tracking cursor of the waveform.

set app = CreateObject("LeCroy.XStreamDSO")

'Display a message on the display

app.SystemControl.PersistentMessage = “Script running; turn off cursor to stop.”

'Change trigger mode to stop

app.Acquisition.TriggerMode = “Stopped”

'Set the cursor type to horizontal absolute value

app.Cursors.Type = "HorizAbs"

'Open cursor

app.Cursors.View = True

'Set the scale 1 waveform horizontal expansion coefficient to 10:1

app.Zoom.Z1.Zoom.HorZoom = 10

'Open the zoom 1 waveform

app.Zoom.Z1.View = True

'Loop to let the zoom center track the horizontal position of the cursor, and exit when the cursor is closed

While app.Cursors.View = True

'Force trigger immediately

'Set the parameter to 0, False, and wait for triggerable events

app.Acquisition.Acquire -1,True

'Read the horizontal position of the cursor

curtime=app.Cursors.XPos1

'Set the Zoom Z1 center to the cursor position

app.Zoom.Z1.Zoom.HorCenter=curtime

Wend

'Clear the message on the screen

app.SystemControl.PersistentMessage = ""

'Disconnect automatic link

Set app = Nothing

Figure 4: Using CustomDSO to run the VB script "zoom_Track.lss". When the script runs, the center of the zoom waveform will track the horizontal absolute cursor position. As can be seen from the figure, the cursor will always be at the center of the zoomed waveform Z1.

Panel design files, CustomDSO, and VB script-based setup files provide a great deal of flexibility in controlling the oscilloscope measurement process. It also provides an easy way to simplify oscilloscope operation by letting inexperienced users follow CustomDSO button-based scripts.


Custom processing and measurements

Customization can also add specialized processing capabilities to an oscilloscope's toolset, allowing you to perform specialized analysis and measurements on an existing oscilloscope. Below we discuss these and other custom techniques that can be applied to mid-range benchtop oscilloscopes.


All mid- to high-end oscilloscopes from the major manufacturers have this optional feature, which provides some sort of mathematical customization based on the insertion of third-party programs into the oscilloscope's processing path. All oscilloscopes support MATLAB. The oscilloscopes mentioned in this article support MATLAB, VB, C/C++, Excel or Java. This function is based on COM architecture and can provide high-level customization functions. User-defined algorithms can be created and inserted into the oscilloscope's processing path, and the returned results can be treated as processed mathematical functions or measurements and displayed like any other oscilloscope waveform or measurement. These waveforms can be further processed by internal or user-defined algorithms.


The oscilloscope uses Microsoft automatic control commands for remote control, and these commands can also be embedded with user-defined algorithms to implement "intelligent algorithms", thus achieving real-time decisions during the calculation process, just as we have seen when using VB scripts.

As an example, consider the oscilloscope measurement setup in Figure 5. A 100MHz sinusoidal carrier wave is frequency modulated by a 10kHz square wave. The waveform is demodulated using a simple MATLAB script, and the demodulated waveform is displayed as mathematical curve F1. The edit box allows users to create, edit or load scripts without leaving the oscilloscope environment, so it is very convenient to create or modify scripts.

Figure 5: This embedded MATLAB script demodulates an FM carrier and displays the modulated waveform. The edit box allows users to create or edit scripts without leaving the oscilloscope environment.


The analog demodulation of the FM signal is implemented using the MATLAB "demodulation" function shown in the first row of the edit box in Figure 5. This function takes the source waveform, carrier frequency, sampling frequency and demodulation type as parameters respectively. The output of the demodulation function must be filtered. The next two lines of code are second-order Butterworth low-pass filters implemented in MATLAB. The same technology can also be used to create custom measurements as well as mathematical functions, the process is the same.

[1] [2]
Reference address:Simplify oscilloscope operation with a custom user interface or test automation capabilities

Previous article:How to place amplifiers on probes to reduce signal losses caused by probes and cables
Next article:How to choose an oscilloscope and what hidden parameters you need to pay attention to

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号