Created
June 20, 2024 06:39
-
-
Save lrodorigo/cdfad0ef9e7c20568e0914c27f3f3cbd to your computer and use it in GitHub Desktop.
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
import time | |
# from threading import Event | |
# | |
import pyvisa | |
# | |
rm = pyvisa.ResourceManager() | |
resources = rm.list_resources() | |
print(f"Risorse disponibili: {resources}") | |
instrument = rm.open_resource('USB0::2391::8199::MY57008022::0::INSTR') # Aggiorna con il tuo identificativo | |
measurements = [] | |
instrument.timeout = 5000 | |
# instrument.write("*CLS") | |
instrument.write("*RST") | |
time.sleep(5) | |
channels = ["101", "102", "103"] | |
config = f"CONF:TEMP TC,J,(@{','.join(channels)})" | |
instrument.write(config) | |
while True: | |
for channel in channels: | |
instrument.write(f"MEAS:TEMP? (@{channel})") | |
reading = instrument.read() | |
print(f"Read {channel}: {float(reading)}") | |
time.sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment