09-22-2009 01:28 AM
Hello,
I've got some instruments on the USB port e.g. "Function Generator", "DC Power Supply" and an "RF Step Attenuator". Now I have to determine programmatically by VISA / IVI what kind/class of instrument do I have on Resource Name xyz.
For example:
I got from VISA several Recource Names e.g. USB0::0x0699::0x0343::C011295::INSTR. Now i what to determine, is there a Function Generator, a PowerSupply or a Step Attenuator...
Is there a way to do it in C# with NI.VisaNS?
09-23-2009 02:27 AM
Couldn't you ask the instruments to identify themselves? Most instruments provide a command for self identification (e. g. "*IDN?).
Regards,
Jochen
09-24-2009 03:35 AM
Unfortunately not, my dc power supply and step attenuator doesn't support any idetifications requests.
otherwise i would have to implement an inflexible, static identifications with the return string that would come from *IDN? . So I wouldn't have the device interchangeability. 😕
Is there an other way?
09-24-2009 03:49 AM
I expected, that there is some kind of comparision between VISA and the special device driver.
ok, actual I'm just "brutforcing". I retrieve from VISA all available Resource Names and try to send a command via an instrument class specific interface e.g. IVIfge.So if it fails, it means its an other instrument class.
But I don't like this method...
09-24-2009 09:27 AM
09-25-2009 12:02 AM