Skip to content

This is a collection of methods to query lab instrument settings and save them in a PNG image file. The file can be used later to restore all the lab instrument settings.

License

Notifications You must be signed in to change notification settings

charkster/inst_settings_in_image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 

Repository files navigation

inst_settings_in_image.py

This is a collection of methods to query lab instrument settings and save them in a PNG image file (or as a separate txt file which is human readable). The PNG or txt file can be used later to restore all the lab instrument settings. The idea is to embed all connected instrument settings in an oscilloscope screen capture. It is done using a JSON database which is also human readable. The instrument settings are a list of scpi commands which uniquely define the instrument state. In order to make the list of scpi commands as short as possible, a python class for each instrument is needed that implements get_unique_scpi(). Presently I have 6 instruments completed (they are located in separate repositories). Oscilloscope settings are different as they are written to instrument and not read back from it. I have included examples of analog channels, digital channels and measurement channels being saved to the png image file, and also those settings restored from the png image file.

The end goal is to have a single file, an oscilloscope screen capture, which can be used to restore the oscilloscope and instruments to the configuration that was used at the time the screen capture was made. I also have a generic approach of capturing the DUT state, which would help to restore the DUT to the state where the oscilloscope capture was made. This is not perfect, I can't capture the physical probe or cable connections, but I would be happy with getting 90% the way there.

Instead of an oscilloscope PNG file, a cellphone photo of the bench setup could be used. The photo could show all the wire connections and all the instrument settings can be restored from it.

The get_instrument_dict() function is standalone and only requires pyvisa. It is the greatest lab instrument script ever written!!

About

This is a collection of methods to query lab instrument settings and save them in a PNG image file. The file can be used later to restore all the lab instrument settings.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages