This is a technical column written by the development team at Nexty Electronics.
This article introduces GUI application development by non-software engineers.
The waveform measured with the oscilloscope is saved as an image.
While this is a standard task in evaluation work, it can add up to a surprising amount of work over time. We've tackled this "unremarkable effort" with a Python GUI application, partnering with a generative AI. We'll share everything from the inspiration behind the development to the technologies used and how it has changed the workplace.
Problems in hardware evaluation work
In evaluating circuit boards and devices for business purposes, we measure countless parameters using an oscilloscope, including interface timing (I2C/I2S/SPI), POWER SUPPLIES sequencing, clock, reset signals, and more. But the process doesn't end there. Each measurement must be recorded as a waveform image for evaluation reports and evidence.
Until we implement the tool we developed this time
This seemingly simple task of "converting waveforms into images" involved a lot of meticulous, often mundane, effort on the ground.
1. Insert a USB memory stick into the oscilloscope and save each image one by one, then copy them to your PC.
2. The waveform image files are named sequentially, making it difficult to later determine which measurement each waveform corresponds to.
3. Manually rename files according to evaluation criteria (mistakes may occur).
4. Enter the channel name one character at a time into the oscilloscope so that you can identify which signal it is.
5. Each time you want to paste an image into a report, open the image, copy and paste it.
In product evaluations involving dozens or even hundreds of measurement items, these tasks, aside from the actual measurement itself, became a significant time sink.
While it is possible to assign arbitrary names to files using the oscilloscope settings, this is not suitable for continuous measurements.
How to connect an oscilloscope to a PC
About VISA / SCPI
In the previous chapter, we discussed the problem of waveform measurement.
Next, let's consider whether it's possible to directly connect a PC and an oscilloscope to exchange data such as waveform images.
This is where VISA/SCPI comes in.
■VISA - Common communication rules to absorb differences in connection methods
VISA (Virtual Instrument Software Architecture) is an industry-standard API (Common Interface) for connecting PCs and measuring instruments.
There are various connection methods for measuring instruments, such as LAN (Ethernet), USB, GPIB, and serial (RS-232C), but the biggest advantage of using VISA is that you can control the measuring instruments from your program using the same procedure regardless of the connection method.
The oscilloscope we will be using has both LAN and USB connection options.
■SCPI - A "common language" for giving instructions to measuring instruments
Once a communication channel is established via VISA, the next step is to tell the measuring instrument "what you want it to do." The common command system for this purpose is SCPI (Standard Commands for Programmable Instruments).
Even if the manufacturer or model is different, similar commands can be used for the same operation, and measuring instruments can be operated simply by sending a string. Here are some examples of SCPI commands used in this tool.
| Things I want to do | SCPI command |
|---|---|
| Checking device information | *IDN? |
| Start of measurement | ACQuire:STATE RUN |
| Stop measurement | ACQuire:STATE STOP |
| Single acquisition (SINGLE) | ACQuire:STOPAfter SEQuence |
| Setting the channel name | CH<n>:LABel:NAME "<name>" |
| Saving the screen image | SAVe:IMAge |
*Some commands may differ depending on the oscilloscope model and vendor.
■ Library installation
To communicate between a PC and an oscilloscope using VISA, you need to install the VISA library on your PC.
In our environment, we installed "TekVISA," provided by Tektronix, to connect to a Tektronix oscilloscope. *1
Please refer to the following for instructions on downloading and installing TekVISA software. *2
TEKVISA Connectivity Software - V5.11.1
https://www.tek.com/ja/support/software/driver/tekvisa-connectivity-software-v5111
- Although different vendors provide different VISA libraries, the communication protocol is the same, so it is possible to communicate using any of the libraries.
However, please note that according to the terms of service, communicating with equipment from a different vendor may constitute a violation of those terms. - The version listed (V5.11.1) is the version available at the time of writing this document and may not be the latest version. When installing, please check the latest version on the Tektronix website and select the version that is appropriate for your environment.
Think about the tools you want to create.
Based on the problem mentioned at the beginning, we will translate the desired functionality of the tool into requirements.
■ Requirements
- You can save oscilloscope images to any location with a single click.
- You can name the waveform image file whatever you like.
- Copy the waveform image to the clipboard so that it can be directly pasted into Excel or other report files.
- You can change the channel name.
- It must be a user-friendly application.
- It should be possible to run it simply by opening the file, without requiring any special environment on the PC side.
While VISA/SCPI allows for the addition of various other features beyond these requirements, our goal was to simplify the implementation by focusing on features frequently used in business operations.
Development using generative AI
From here, we will actually proceed with development, with the help of a generation AI based on the requirements.
■ Development Flow
In reality, there was some trial and error in structuring the workflow, but we proceeded in the manner described above.
① Submit requirements to Copilot and obtain development procedures.
While we could have started development from scratch using Cursor's chat-based approach, Cursor consumes credits to use, so in our initial considerations, we used Copilot to investigate what development methods were possible.
② Development based on the method using Cursor
Based on the method obtained in ①, we will use Cursor to actually perform vibe coding *.
The model I used at the time was the Claude Opus 4.7.
③ Operation verification
We will debug the program on the Cursor and verify that various functions are actually working.
If a problem occurs here, information such as error logs will be stored in the Cursor, and a "remediation loop" will be initiated where the incident and logs are uploaded to the Cursor to make improvements.
- *Vibe coding... A method of coding by giving instructions to a generative AI using natural language.
About the technology stack
Here is a description of the technology stack used in this application.
Technology stack... A set of technologies used in combination to build a system or application.
wxPython
We chose wxPython as the library for implementing the GUI. While Python also has a standard library called Tkinter, we chose wxPython because it looks better and the implementation difficulty is not significantly higher compared to Tkinter.
PyVISA
This is a library for implementing VISA/SCP, as described in Chapter 2, using Python.
Pillow (PIL)
The Pillow (PIL) image processing library converts waveform images (PNG) acquired from an oscilloscope into a format that can be "directly pasted" into reports. It acts as a bridge, converting the acquired PNG into a format that can be handled by the Windows clipboard.
pywin32
pywin32 is what actually sends the image converted by Pillow to the Windows clipboard. It's a library that allows you to call Windows functions directly from Python, creating a situation where "the waveform image is copied to the clipboard the moment it's saved."
In addition to saving images, you can also paste them into reports, such as Excel spreadsheets.
PyInstaller
The completed application is created as an executable file (.exe) using PyInstaller. There is no need to set up a Python environment on the user's PC; they can start using it simply by copying the file.
While it's not strictly necessary if the user has a Python environment on their PC, we opted for an executable file because it's preferable considering that others will also be using it.
Checking operation and effect
Operation check
I will omit the explanation of the development part in Cursor, but after repeating the interaction with the AI agent several times, I was able to create an executable file that starts without errors, so I will now check its operation.
The program shown in the image is Rev2.20, which has undergone several revisions to incorporate additional requirements after its initial completion.
We can confirm that we are communicating with the Tektronix oscilloscope via VISA.
Now, apply the label "TEST1" to CH1, press the waveform image save button, and check the file.
The image was successfully saved to the specified directory on the PC and to the clipboard. When opened, it could be read as an image normally, and the label "TEST1" was confirmed in CH1.
I was also able to confirm the operation control of various oscilloscopes listed in the program operation section.
All basic functions worked without any problems, so we will now incorporate exception handling so that it can be rolled out to other users.
Development is complete after implementing and testing the handling of USB insertion/removal and cases where no devices are found during the target device search.
■Effect
In actual work, the effect was that the time spent saving waveform images from the oscilloscope to a USB memory stick, renaming the numbered images to appropriate filenames, and pasting images from directories into evaluation materials was completely eliminated, resulting in a reduction of about one hour of work per day.
In addition to reducing man-hours, the time-consuming process of importing waveform images has been eliminated, allowing us to proceed with our work more efficiently.
Summary
In this article, we introduced GUI application development by non-software engineers, using a waveform image acquisition support tool as an example.
Thanks to advancements in generative AI, it has become much easier to develop tools that solve problems in the field. If this article has piqued your interest, please give it a try!
Please review this disclaimer before using this column.




![Even beginners can do it! Zephyr RTOS development environment setup and multi-board setup practical steps [Windows + WSL version]](/uploads/media_files/zephyr_rtos_thumbnail-9222533821.jpg)


