From 4e6bbdb5304b59908899a13aadeccdacbee6154a Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Wed, 15 May 2024 12:10:48 -0600 Subject: [PATCH] Add queue clear for SCIPY Signed-off-by: Travis F. Collins --- bench/common.py | 1 + bench/keysight/e36233a.py | 1 + 2 files changed, 2 insertions(+) diff --git a/bench/common.py b/bench/common.py index 565feaa..98c2623 100644 --- a/bench/common.py +++ b/bench/common.py @@ -26,6 +26,7 @@ def _find_dev_ind(self, rm): self.address = res self._instr = rm.open_resource(self.address) self._instr.timeout = 15000 + self._instr.write("*CLS") return True return False diff --git a/bench/keysight/e36233a.py b/bench/keysight/e36233a.py index d8e99c2..6bb19a2 100644 --- a/bench/keysight/e36233a.py +++ b/bench/keysight/e36233a.py @@ -99,6 +99,7 @@ def __init__(self, address: str = None) -> None: self.address = address self._instr = pyvisa.ResourceManager().open_resource(self.address) self._instr.timeout = 15000 + self._instr.write("*CLS") q_id = self._instr.query("*IDN?") if self.id not in q_id: raise Exception(