Qcodes icon indicating copy to clipboard operation
Qcodes copied to clipboard

What to do with channel instances after instrument is closed

Open astafan8 opened this issue 7 years ago • 0 comments

What happens when an instrument is closed but there are still instances of its InstrumentChannel channels lying around?

I suggest that their methods should be protected against this in order to help in debugging possible weird scenarios.

For example, for the SR860:

lockin = SR860("lockin", "GPIB0::4::INSTR")
data_channel = lockin.data_channel_3
lockin.close()
data_channel.<...>(...)  # <-- what will this do? raise a cryptic error?

astafan8 avatar Oct 30 '18 15:10 astafan8