Created
January 28, 2025 14:51
-
-
Save steveway/5df151c743aeec7cbb45fdd18d199c2f to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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