diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2023-06-21 11:47:51 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2023-06-21 11:47:51 -0400 |
commit | 1eb507f97c3aebc76383e29eb703a4286b1aa8c6 (patch) | |
tree | 773e41aca2adff105bc3106d5af3c30771610a3d | |
parent | af9b2f87ec1013a35fb71b2683aea56eb11bdf1b (diff) | |
download | qolab-1eb507f97c3aebc76383e29eb703a4286b1aa8c6.tar.gz qolab-1eb507f97c3aebc76383e29eb703a4286b1aa8c6.zip |
clear read buffer before sending and reading commands
-rw-r--r-- | qolab/hardware/multimeter/bk_5491.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/qolab/hardware/multimeter/bk_5491.py b/qolab/hardware/multimeter/bk_5491.py index 9186854..0b9d788 100644 --- a/qolab/hardware/multimeter/bk_5491.py +++ b/qolab/hardware/multimeter/bk_5491.py @@ -50,6 +50,7 @@ class BK_5491(Multimeter): BK_5491 in not SCPI instrument, so we get some replies (prompts *>, =>, etc) even if we just send a command not a query. So we have to work around this. """ + self.resource.read_bytes( self.resource.bytes_in_buffer ) # clear read buffer # print(f"dbg: {cmd_string=}") self.write(cmd_string) if expect_reply: |