From 331159127410dfed4884aa645b6847b9f1d9b050 Mon Sep 17 00:00:00 2001 From: Darius Berghe Date: Thu, 9 Feb 2017 12:29:24 +0100 Subject: [PATCH] fixed false waitsrq detection with NI-VISA/NI488.2 15.5 --- design.py | 2 +- telhacks.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/design.py b/design.py index 606d66d..6d4af19 100644 --- a/design.py +++ b/design.py @@ -234,7 +234,7 @@ def retranslateUi(self, MainWindow): self.commandEdit.setPlaceholderText(_translate("MainWindow", "Example: F, Ft ...")) self.queryButton.setText(_translate("MainWindow", "ibwrt | ibrd")) self.queryResponseButton.setText(_translate("MainWindow", "ibwrt | ibrsp")) - self.versionLabel.setText(_translate("MainWindow", "v0.2.1")) + self.versionLabel.setText(_translate("MainWindow", "v0.2.0-19-g3dd139c")) self.writeButton.setText(_translate("MainWindow", "ibwrt")) self.readButton.setText(_translate("MainWindow", "ibrd")) self.serialPollButton.setText(_translate("MainWindow", "ibrsp")) diff --git a/telhacks.py b/telhacks.py index 1f9f68c..894f8b7 100644 --- a/telhacks.py +++ b/telhacks.py @@ -60,5 +60,7 @@ def wait_for_srq(self, timeout=25000): # instead of redoing a serial poll (as the original pyvisa does) if rsp.timed_out == False: break + else: + raise VisaIOError(constants.StatusCode.error_timeout) - #self.discard_events(constants.VI_EVENT_SERVICE_REQ, constants.VI_QUEUE) \ No newline at end of file + self.disable_event(constants.VI_EVENT_SERVICE_REQ, constants.VI_QUEUE) \ No newline at end of file