04-28-2010 03:26 PM
I have various oscilloscope models sitting around the lab, some two-channel, some four-channel. I would like for my program to be able to detect how many channels are available.
I can just tell my program how many channels are available based on model number, but is there a VISA command to ask the scope directly what channels it has? I would also like to be able to ask it what, if any, math function capability it has.
Solved! Go to Solution.
04-28-2010 08:18 PM
04-29-2010 02:36 PM
04-29-2010 03:18 PM
"The only relationship between VISA and your problem is that you would use VISA to write any instrument specific command that might exist and then use VISA to read the response."
Sorry, you're right. I meant SCPI, not VISA. I can access individual channels in with :CHAN<n>, where <n> is the channel number, but I don't know what acceptable values for <n> are. Although, as I look more into SCPI, it looks like :CHAN<n> may be instrument specific.
"all oscilloscope drivers should return the instrumentID after the initialize and that should be enough to know the number of channels"
This gives me manufacturer, model number, serial number, software revision. It tells me nothing about number of channels.
04-29-2010 08:35 PM
04-30-2010 07:13 AM
"all oscilloscope drivers should return the instrumentID after the initialize and that should be enough to know the number of channels"
What Albert was refering to is that all IVI Scope compliant drivers in their base class interface have a property/attribute which tells you how many channels the scope has.
If you don't want to use the IVI driver for the scope then maybe download some of the drivers and look at the source code to see how they calculate this dynamic repeated capablity.
04-30-2010 08:39 AM
I had looked for this attribute and couldn't find it, but once you said that all IVI scope drivers have this I looked a bit harder and was able to find it. If all IVI scope-compliant drivers are required to support this, then I think I have what I need.
Thanks!