Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine what kind of instrument is at ResourceName xyz?

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?

0 Kudos
Message 1 of 6
(3,857 Views)

Couldn't you ask the instruments to identify themselves? Most instruments provide a command for self identification (e. g. "*IDN?).

 

Regards,

Jochen

0 Kudos
Message 2 of 6
(3,830 Views)

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?

0 Kudos
Message 3 of 6
(3,808 Views)

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...

 

0 Kudos
Message 4 of 6
(3,806 Views)
There is nothing implemented in the IVI spec for identifying instruments. If your instruments do not support the *IDN? query, then you have few options. One that comes to mind is to assign a meaningful alias so you would not get the cryptic canonical VISA name.
0 Kudos
Message 5 of 6
(3,789 Views)
For USB attached devices you could try to decode the ressource name. The numbers in the ressource name  include  unique vendor and  device IDs.  
0 Kudos
Message 6 of 6
(3,775 Views)