Hey all,
I am an avid python scripter, and was wondering how I could connect/log data from an oscilloscope (I'm looking at the DSOX2004A) using Python. I'm open to using USB or Ethernet (I actually slightly prefer ethernet so I can talk to multiple devices simultaneously), but its unclear to me what the easiest way to get going is.
I've seen a few people post code, but I'd really like to have a more clear idea about what the general structure is of how to interface with the scope than simply the code to perform a specific task. I'm used to talking to arduinos over serial, but am not sure what I'm supposed to do with an oscilloscope to talk to it. Do I need PyVISA? Can it be done over a serial/usb connection?
any help would be greatly appreciated,
nathan lachenmyer
I am an avid python scripter, and was wondering how I could connect/log data from an oscilloscope (I'm looking at the DSOX2004A) using Python. I'm open to using USB or Ethernet (I actually slightly prefer ethernet so I can talk to multiple devices simultaneously), but its unclear to me what the easiest way to get going is.
I've seen a few people post code, but I'd really like to have a more clear idea about what the general structure is of how to interface with the scope than simply the code to perform a specific task. I'm used to talking to arduinos over serial, but am not sure what I'm supposed to do with an oscilloscope to talk to it. Do I need PyVISA? Can it be done over a serial/usb connection?
any help would be greatly appreciated,
nathan lachenmyer
I am currently using Python to remote control my DSO6104A either via USB or LAN.
Yes, you need PyVisa. You obviously need the Agilent connection expert also.
Example 01 (directly with PyVisa):
Because Visa is based on ambiguous strings (to my opinion...) writing a high level wrapper for the PyVisa module will help you getting rid of the strings. It makes life easier.
To do so, the GUIDE (6000_series_prog_guide.pdf) has been very helpfull. It lists all the functions you can use with Visa and how to use them. Of course, you will have to clean up things to make it work perfectly under Python but the wrapper is used in that purpose.
Hope this helps.