Replies: 3 comments
-
|
Hi @Q-TWil, the first method is what was originally intended and as far as I know what most drivers implement. I think this is a better match since ChannelList/Tuple is designed as a container for identical channels where you can run the same command on all channels. e.g. something like Which would set the voltage on all channels in the container. Something like this will not work well if you have an output and a source channel that are different. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks, that indeed seems to be the better abstraction. That being said, I suppose it would still be possible to make e.g. two ChannelList/Tuple for the source and output commands respectively. Something like: myinstr.output.load(50)
myinstr.source.am_source(1)where |
Beta Was this translation helpful? Give feedback.
-
|
Yes from an API perspective I don't see any problems in that. What makes the most sense for a specific instrument probably depends on the specific instrument and how many subcommands it has for each group (source, output etc) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I’m working on writing a set of instrument driver based on an SCPI command set, and I’m unsure about the best way to use the
InstrumentChannelclass. As an example I'll be referring to the Rigol DG800/DG900 Pro series of AWGs. The programming guide with the SCPI commands can be found here.My question is:
InstrumentChannelbe used as an abstraction of the physical channels on the device (e.g., the input channels of an oscilloscope)? For instance, for the DG800 Pro, the:OUTPut[<n>]:LOADand[:SOURce[<n>]]:AM:SOURcecommands would be captured by parameters in the same class :InstrumentChannelclasses for all:SOURce[<n>]:commands and another for all:OUTPut[<n>]:, essentially replicating the SCPI hierarchy:I'm asking because I came across this PR QCoDeS/Qcodes_contrib_drivers#352 which uses the later approach.
What is the recommended best practice here? Should
InstrumentChannelprimarily reflect physical channels, or is it preferable to mirror the SCPI command hierarchy?Beta Was this translation helpful? Give feedback.
All reactions