Skip to content

Commit

Permalink
Merge 1ac750b into c9ffd6e
Browse files Browse the repository at this point in the history
  • Loading branch information
trappitsch committed Sep 12, 2020
2 parents c9ffd6e + 1ac750b commit 81588b1
Show file tree
Hide file tree
Showing 2 changed files with 467 additions and 6 deletions.
12 changes: 6 additions & 6 deletions instruments/keithley/keithley195.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,7 @@ def measure(self, mode=None):
current_mode = self.mode
if mode != current_mode:
self.mode = mode
if not self._testing:
time.sleep(2) # Gives the instrument a moment to settle
time.sleep(2) # Gives the instrument a moment to settle
else:
mode = self.mode
value = self.query('')
Expand Down Expand Up @@ -301,18 +300,19 @@ def parse_status_word(statusword): # pylint: disable=too-many-locals

(trigger, function, input_range, eoi, buf, rate, srqmode, relative,
delay, multiplex, selftest, data_fmt, data_ctrl, filter_mode,
terminator) = struct.unpack('@4c2s3c2s5c2s', statusword[4:])
terminator) = struct.unpack('@4c2s3c2s5c2s', bytes(statusword[4:],
"utf-8"))

return {'trigger': Keithley195.TriggerMode(int(trigger)),
'mode': Keithley195.Mode(int(function)),
'range': int(input_range),
'eoi': (eoi == '1'),
'eoi': (eoi == b'1'),
'buffer': buf,
'rate': rate,
'srqmode': srqmode,
'relative': (relative == '1'),
'relative': (relative == b'1'),
'delay': delay,
'multiplex': (multiplex == '1'),
'multiplex': (multiplex == b'1'),
'selftest': selftest,
'dataformat': data_fmt,
'datacontrol': data_ctrl,
Expand Down
Loading

0 comments on commit 81588b1

Please sign in to comment.