diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-07-13 22:32:11 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-07-13 22:32:11 -0400 |
commit | c1fb0534f543ad739309aeb665818a14cabed442 (patch) | |
tree | 70a8b4df3536336947f51c6502b507a7fde1640b /qolab/hardware/multimeter | |
parent | 3fb3d0682dffe51ce68b49b12536469514634d88 (diff) | |
download | qolab-c1fb0534f543ad739309aeb665818a14cabed442.tar.gz qolab-c1fb0534f543ad739309aeb665818a14cabed442.zip |
improved doc strings
Diffstat (limited to 'qolab/hardware/multimeter')
-rw-r--r-- | qolab/hardware/multimeter/bk_5491.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/qolab/hardware/multimeter/bk_5491.py b/qolab/hardware/multimeter/bk_5491.py index 015c36c..cbab6e0 100644 --- a/qolab/hardware/multimeter/bk_5491.py +++ b/qolab/hardware/multimeter/bk_5491.py @@ -5,12 +5,15 @@ import time class BK_5491(Multimeter): - """BK 5491 multimeter""" + """BK 5491 multimeter - """ - rm = pyvisa.ResourceManager() - instr=rm.open_resource('ASRL/dev/ttyUSB0::INSTR') - Make sure to switch off the ECHO at the multimeter communication setup + Make sure to switch off the ECHO at the multimeter communication setup. + + Example + ------- + >>> rm = pyvisa.ResourceManager() + >>> instr=rm.open_resource('ASRL/dev/ttyUSB0::INSTR') + >>> multimeter = BK_5491(instr) """ def __init__(self, resource, *args, **kwds): @@ -49,14 +52,16 @@ class BK_5491(Multimeter): return False def write(self, cmd_string): + """Write/send command to instrument""" return self._readwrite(cmd_string, expect_reply=False, Nattemts=1) def query(self, cmd_string): + """Query instrument with command""" return self._readwrite(cmd_string, expect_reply=True, Nattemts=5) def _readwrite(self, cmd_string, expect_reply=True, Nattemts=5): """ - Set command to instrument or query it readings (which is also a command) + Send command to instrument or query it readings (which is also a command) BK_5491 is not a 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. |