Created
July 4, 2019 06:17
-
-
Save kmcallister/5bc46e651354c9a25603e006d72f240b to your computer and use it in GitHub Desktop.
Dead-simple DS1054Z data logger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import time | |
import visa | |
IP_ADDR = '192.168.50.219' | |
INTERVAL = 1.0 | |
rm = visa.ResourceManager('@py') | |
scope = rm.open_resource('TCPIP::%s::INSTR' % (IP_ADDR,)) | |
while True: | |
value = float(scope.query(':MEAS:ITEM? VAVG, CHAN1')) | |
print time.time(), value | |
time.sleep(INTERVAL) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment