VISA COM Example With Oscilloscope


Oscilloscopes are an integral part of electronic design.  They can also be powerful data loggers when used with control software.  We have several labs areas populated with Keysight Technologies devices (previously Agilent, and before that Hewlett Packard).  The labs include oscilloscopes, spectrum analyzers, power supplies, network analyzers, function generators, and more.  One thing they all have in common is the ability to control them with VISA COM.  VISA stands for Virtual Instrument Software Architecture.

Last year I finished two projects that incorporated VISA COM as part of the design process.  The first was an LED lighting design that required control of a power supply, multimeter, and light meter for prolonged testing.  The first two instruments operated using VISA COM, with the light meter requiring a non-standard serial interface.   At the end of the day the software interface allowed for extensive testing over a range of conditions.  The same tests would have been difficult to implement with manual control.  Even more difficult would have been the logging of circuit performance data over a wide range of operating conditions.

The second design required the measurement of two signals with an oscilloscope.  The first was a trigger signal, and the second was the output of a transducer.  It was necessary to measure the time from the trigger occurring to a voltage threshold on the transducer’s signal.  This is pretty easy to do in the lab.  But our customer needed to make the same measurement and log the results at their location.  We ended up writing a VISA COM program in Visual Studio that automatically configured their oscilloscope and took the appropriate measurement.

Subsequent to those designs I wrote a program to explore some more of the features of VISA COM.  In this program I fleshed out some of the things we might want to do with VISA COM for future designs.  These included providing more oscilloscope settings via the software interface, performing a screen capture, and digitizing the data captured from an oscilloscope channel.

In my software’s settings tab I allowed the user to configure individual channels for display and allowed the user to set the vertical axis scaling.  I also allowed the user to adjust the horizontal time base, trigger channel, trigger polarity and trigger type.  There are a myriad of possible settings that can be software controlled, but this seemed like a good starting point.


Data collected by the oscilloscope can be digitized and saved as a text file.   The digitized waveforms I collected were plotted using the chart object available in Visual Basic.


The digitized data could be used for a variety of things.  For example, you could collect an oscilloscope waveform and then apply a digital filter in high level software.  Once the desired filter was determined it could be ported to firmware for inclusion in an embedded design.

I used an MSO6054A Mixed Signal Oscilloscope (Keysight) with this software.  But it could be used with some of the newer cheaper models available.  Together with Visual Studio and VISA COM these lab instruments begin to perform like much more expensive data loggers.  Combined they open up a lot of opportunities for electronic engineers to automate testing and measurement.

The example program I wrote (Visual Studio 2013 VB application) can be downloaded at


  1. Hi,

    Wow it look great, but he link above does not work.
    Please fix it, I can’t wait, I would love to use it.

    Thanks for sharing.


  2. Jerry Renken says:

    Where is the zip file? I can’t find it

Speak Your Mind


This site uses Akismet to reduce spam. Learn how your comment data is processed.