Skip to content

Channel get() broken #3

Description

@reneotten

Steps to reproduce

dac.channels[6].volt.get()

Expected behaviour

Return voltage on channel

Actual behaviour

File "", line 1, in
dac.channels[6].volt.get()

File "c:\users\lab2\documents\python\qcodes\qcodes\instrument\parameter.py", line 405, in get_wrapper
e.args = e.args + ('getting {}'.format(self),)

File "c:\users\lab2\documents\python\qcodes\qcodes\instrument\parameter.py", line 361, in get_wrapper
# There might be cases where a .get also has args/kwargs

File "c:\users\lab2\documents\python\qcodes\qcodes\utils\command.py", line 177, in call
return self.exec_function(*args)

File "c:\users\lab2\documents\python\qcodes\qcodes\instrument_drivers\Harvard\FZJ_Decadac.py", line 234, in _get_volt
self._parent._write(self, DacBase._COMMAND_GET_VOLT)

File "c:\users\lab2\documents\python\qcodes\qcodes\instrument_drivers\Harvard\FZJ_Decadac.py", line 522, in _write
return self._parent._write(obj, cmd)

File "c:\users\lab2\documents\python\qcodes\qcodes\instrument_drivers\Harvard\FZJ_Decadac.py", line 661, in _write
self._set_channel(obj._parent, obj)

File "c:\users\lab2\documents\python\qcodes\qcodes\instrument_drivers\Harvard\FZJ_Decadac.py", line 640, in _set_channel
if self._set_slot(slot) or self.current_channel == None or self.current_channel.number != channel.number:

File "c:\users\lab2\documents\python\qcodes\qcodes\instrument_drivers\Harvard\FZJ_Decadac.py", line 623, in _set_slot
self._write(self, DacBase._COMMAND_SET_SLOT.format(slot.number))

File "c:\users\lab2\documents\python\qcodes\qcodes\instrument_drivers\Harvard\FZJ_Decadac.py", line 668, in _write
return self._read(self, len(cmd))

File "c:\users\lab2\documents\python\qcodes\qcodes\instrument_drivers\Harvard\FZJ_Decadac.py", line 685, in _read
result = super().ask_raw(buf_size)

File "c:\users\lab2\documents\python\qcodes\qcodes\instrument\visa.py", line 224, in ask_raw

File "C:\Users\lab2\anaconda3\envs\qcodes\lib\site-packages\pyvisa\resources\messagebased.py", line 563, in query
self.write(message)

File "C:\Users\lab2\anaconda3\envs\qcodes\lib\site-packages\pyvisa\resources\messagebased.py", line 223, in write
count = self.write_raw(message.encode(enco))

AttributeError: ("'int' object has no attribute 'encode'", 'getting DecaDac_Slot1_Chan1_volt')

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions