aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware/scpi.py
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-23 13:18:06 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-23 13:18:59 -0400
commit62464241c829f4e167711482e53e20f5520cf81e (patch)
tree7b7701e6445dc73b4f762d953eaf925b733383fc /qolab/hardware/scpi.py
parentfdceeef16e8808f40ea090bcdc521e0c060b234c (diff)
downloadqolab-62464241c829f4e167711482e53e20f5520cf81e.tar.gz
qolab-62464241c829f4e167711482e53e20f5520cf81e.zip
added debug capability to SCPI communication
Diffstat (limited to 'qolab/hardware/scpi.py')
-rw-r--r--qolab/hardware/scpi.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/qolab/hardware/scpi.py b/qolab/hardware/scpi.py
index 99760f3..d241d52 100644
--- a/qolab/hardware/scpi.py
+++ b/qolab/hardware/scpi.py
@@ -189,13 +189,22 @@ class SCPIinstr:
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
+ def write(self, *args):
+ logger.debug(f"write with args: {args}")
+ return self.resource.write(*args)
+
+ def read(self, *args):
+ logger.debug(f"read with args: {args}")
+ return self.resource.read(*args)
+
+ def query(self, *args, **kwds):
+ logger.debug(f"query with args: {args}")
+ return self.resource.query(*args, **kwds)
+
@property
def idn(self):
return self.query("*IDN?")