From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Serial Number of GPIB-USB-HS

Solved!
Go to solution

How can I programmatically get serial number of GPIB-USB-HS device?

0 Kudos
Message 1 of 13
(7,704 Views)
Solution
Accepted by topic author BAP_TM

I worked it out. Simple solution attached.

Is it possible using VISA driver?

0 Kudos
Message 2 of 13
(7,658 Views)

Dear tma_lv,

 

First of all, let my welcome You to the NI forums. I am glad you could find a working solution and that you published it for others to see!

One more way of doing it is described in the following KB:

 

Programmatically Reading Serial Number of VISA Devices and Resources in LabVIEW


http://digital.ni.com/public.nsf/allkb/7451FE57F3747C8386257480006D83CB?OpenDocument

 

Please let us know, if you found this useful,

Best regards,

Peter

 

 

Peter L.
National Instruments Hungary
Applications Engineer
0 Kudos
Message 3 of 13
(7,649 Views)

I've found this solution earlier, but unfortunately it's not working for GPIB-USB-HS. VISA driver return serial number of connected device, not GPIB-USB converter. From VISA point of view, GPIB-USB-HS is transparent and couldn't be selected as VISA resource.

I'm still looking for solution that (on the basis of VISA refnum) will fetch data (like SN, Model, Vendor) of gpib interface.

0 Kudos
Message 4 of 13
(7,645 Views)

@BAP_TM wrote:

I've found this solution earlier, but unfortunately it's not working for GPIB-USB-HS. VISA driver return serial number of connected device, not GPIB-USB converter. From VISA point of view, GPIB-USB-HS is transparent and couldn't be selected as VISA resource.

I'm still looking for solution that (on the basis of VISA refnum) will fetch data (like SN, Model, Vendor) of gpib interface.


It is possible to open the GPIB interface itself using the VISA name "GPIB0::INTFC", but I don't think you can retrieve the serial number through it.

 

The solution you found using the System Configuration API is really the most flexible solution, since it can be used for other types of NI hardware also, and not just for the GPIB-USB-HS. Is there any particular reason you don't want to use the solution you have already found?

0 Kudos
Message 5 of 13
(7,634 Views)

It would be easier (faster :)) if I have "direct link" between visa session and serial number of used hardware. Ok, on the basis of gpib interface name (catched from visa resource name) I will search for appropriate GPIB-USB-HS device.

Thanks a lot for all replies.

0 Kudos
Message 6 of 13
(7,632 Views)

I found this example as well, however when I use this property node it only returns a generic name.  There is no "SN:" portion to what is returned.  I simplified it to a String Constant "GPIB::1::INSTR" --> VISA Open --> Property Node (Intf Inst Name) with indicator --> VISA Close... There is no Serial Number info returned when the .vi is run, only a generic GPIB-USB-HS name is returned.  The instrument at that address happened to be a Keithly 2420 SMU and is verified as working normally through remote control.

 

I need to be able to programmatically get the serial numbers of all the devices on a bench.  Any idea why I am not seeing any SN info even when I simplified it down to a bare bones .vi?  I'm using LV13.

 

Thanks! 

0 Kudos
Message 7 of 13
(6,574 Views)
Why are you using GPIB::1::INSTR to get the serial number of the controller? What is wrong with the system configuration solution to get the gpib-usb-hs serial number? If you want an instrument serial number, your question is off-topic and you should start a new thread after reading the instrument manual.
0 Kudos
Message 8 of 13
(6,559 Views)

Your response is not helpful in the least. 

 

The VISA Open .vi accepts a direct string constant.  Why is it a problem that I used it?  I can't imagine I'm the first one in history that wanted to programmatically get all Serial Numbers of equipment on a bench.  If anybody knows a thread that discusses this, I'd love to know.  I have yet to find this problem discussed exactly.  The example given in this thread was the only response I could find dealing with getting Serial Numbers and it seemed like it was intended to be able to do what I need to do.

 

If there is no simple way in LV and each piece of equipment must be known and addressed differently to get a serial number, that would be great information too.  I'd appreciate it if somebody could respond with actual helpful information.

 

Thanks!

0 Kudos
Message 9 of 13
(6,541 Views)
Your question is completely off-topic to this thread. Is that hard to understand? You posted to a thread that is marked as solved. Is that hard to understand? You should have started a new thread if you wanted the serial number of an instrument, not the controller. That is why your question is confusing. Use the *IDN? query if you need specific information about an instrument and parse accordingly. Basic.
0 Kudos
Message 10 of 13
(6,527 Views)