diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-01 11:26:39 -0500 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-01 11:26:39 -0500 |
commit | 9f1c2db9d296dc17f86e1f22634a14063b1d0a72 (patch) | |
tree | 1b50709ed0ef78888bcb61e2b0e97ec6916589a8 /scpi.py | |
parent | 642c6f937a2826cb92b8f83b5b61a4c17d551e2c (diff) | |
download | qolab-9f1c2db9d296dc17f86e1f22634a14063b1d0a72.tar.gz qolab-9f1c2db9d296dc17f86e1f22634a14063b1d0a72.zip |
improve hardware definitions
Diffstat (limited to 'scpi.py')
-rw-r--r-- | scpi.py | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/scpi.py b/scpi.py deleted file mode 100644 index 5e548ef..0000000 --- a/scpi.py +++ /dev/null @@ -1,65 +0,0 @@ -""" -provide basic class to operate Lock-in -""" - -import pyvisa - -class SCPIinstr: - """ Basic class which support SCPI commands """ - """ - Do not instantiate directly, use - rm = pyvisa.ResourceManager() - SCPIinstr(rm.open_resource('TCPIP::192.168.0.2::INSTR')) - """ - def __init__(self, resource): - self.resource = resource - - # convenience pyvisa functions - self.write = self.resource.write - self.read = self.resource.read - self.query = self.resource.query - self.read_bytes = self.resource.read_bytes - self.read_binary_values = self.resource.read_binary_values - self.query_binary_values = self.resource.query_binary_values - - @property - def idn(self): - return self.query("*IDN?") - - def clear_status(self): - self.write("*CLS") - - def set_event_status_enable(self): - self.write("*ESE") - - def query_event_status_enable(self): - self.query("*ESE?") - - def query_event_status_register(self): - self.query("*ESR?") - - def set_wait_until_finished(self): - self.query("*OPC") - - def wait_until_finished(self): - self.query("*OPC?") - - def reset(self): - self.write("*RST") - - def set_service_request_enable(self): - self.write("*SRE") - - def query_service_request_enable(self): - self.query("*SRE?") - - def query_status_byte(self): - self.query("*STB?") - - def self_test_result(self): - self.query("*TST?") - - def wait(self): - self.write("*WAI") - - |