Open maij opened 4 years ago
I've thought about this more and I don't think this is a bug, it's the expected behaviour because a Parameter
created in an arbitrary context doesn't know about it's instrument or parent.
Well hold your horses, I think this is a bug and should be resolved. I understand that at the start the instantiated parameter does not have a parent and consequently get/set shouldn't work. However, once you attach it to a ParameterNode, its parent is set and so it shouldn't fail anymore.
I think the way to resolve this is by having the get/set cmd access the parameter parent. If this isn't defined it raises an error, but only once the get/set is called. This way, the parent can be defined later. What do you think?
This may only apply to VISA instrument parameters, the error that arises is below.
This is a minimal working example from the Keithley SMU, in this case the get command fails but the set command is fine.
In Jupyter I run
What's also strange is that instrument initialisation takes a lot longer (~ 30s, usually its < 1s) when I include the second sense_mode parameter.