Skip to content

Instantly share code, notes, and snippets.

@steveway
Created January 28, 2025 14:51
Show Gist options
  • Select an option

  • Save steveway/5df151c743aeec7cbb45fdd18d199c2f to your computer and use it in GitHub Desktop.

Select an option

Save steveway/5df151c743aeec7cbb45fdd18d199c2f to your computer and use it in GitHub Desktop.
import pyvisa as visa
def main():
ip = "192.168.10.13"
device = visa.ResourceManager().open_resource(f"TCPIP0::{ip}::INSTR")
device_id = device.query("*IDN?")
print(f"Device ID: {device_id}")
date = device.query(":SYST:DATE?")
print("Date:", date)
time = device.query(":SYST:TIME?")
print("Time:", time)
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment