Skip to content

Instantly share code, notes, and snippets.

@elpollodiablo
Last active August 29, 2015 13:56
Show Gist options
  • Save elpollodiablo/8893947 to your computer and use it in GitHub Desktop.
Save elpollodiablo/8893947 to your computer and use it in GitHub Desktop.
# Snatching a screenshot from a VXI11/LXI/SCPI device (tested on Rigol DS2072)
import vxi11, datetime
instr = vxi11.Instrument("192.168.0.22")
f=open(datetime.datetime.now().strftime("%Y-%m-%d_%H:%M:%S") + ".bmp", "w")
f.write(instr.ask_raw(":DISPlay:DATA?")[11:])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment