Skip to content

Instantly share code, notes, and snippets.

@jepler
Created February 14, 2024 18:05
Show Gist options
  • Select an option

  • Save jepler/14c5ef7c12ceb992b8fd679ef25bd65c to your computer and use it in GitHub Desktop.

Select an option

Save jepler/14c5ef7c12ceb992b8fd679ef25bd65c to your computer and use it in GitHub Desktop.
import time
import datetime
import pyvisa
import rigol1000z
rm = pyvisa.ResourceManager()
osc_resource = rm.open_resource("USB0::6833::1230::DS1ZD194301173::0::INSTR")
osc = rigol1000z.Rigol1000z(osc_resource)
while True:
now = datetime.datetime.now()
delay_max = osc.visa_ask(':MEASure:STATistic:ITEM? MAXimum,RDELay').strip()
delay_min = osc.visa_ask(':MEASure:STATistic:ITEM? MINimum,RDELay').strip()
delay_cur = osc.visa_ask(':MEASure:STATistic:ITEM? CURRent,RDELay').strip()
print(now, delay_max, delay_min, delay_cur, "# min max cur")
time.sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment