From 62464241c829f4e167711482e53e20f5520cf81e Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Tue, 23 Jul 2024 13:18:06 -0400 Subject: added debug capability to SCPI communication --- qolab/hardware/scpi.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'qolab') 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?") -- cgit v1.2.3