Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

can if find a serial device S/N in code?

I have been successful in finding device serial numbers for DAQmx devices in code, but can't seem to find a property node which works. I am trying to find a way to identify a specific serial device in code to minimize setup time for the user.

Doug
Doug Ferguson
0 Kudos
Message 1 of 11
(4,643 Views)

What do you mean? You say you can find a serial number but then you say you can't find a property node that works. The only way I know to get a DAQmx serial number is with the DAQmx Device property, pass it the active device, and read DevSerialNum.

p.s. For questions about DAQmx, you should be posting to the Multifunction DAQ baord.

0 Kudos
Message 2 of 11
(4,639 Views)
Sorry for the confusion, but the title of my question is "can if find a serial device S/N in code?". I have found property nodes for DAQmx devices to read serial numbers, but I can not find a solution in code to read serial numbers for serial devices i.e. a USB to RS-485 device.
Doug Ferguson
0 Kudos
Message 3 of 11
(4,634 Views)
You want the serial number of a USB-RS-485 converter or the instrument you have conected to the converter? My guess is that you would want the instrument serial number.  That is completely device dependent. If the instrument's command set supports it, you will have to issue the query with a VISA Write and then do a VISA Read to get it. You need to check the programming manual of your instrument - not anything in whatever programming language you are using.
0 Kudos
Message 4 of 11
(4,632 Views)
I need the serial number of the USB485 converter.


Doug Ferguson
0 Kudos
Message 5 of 11
(4,621 Views)
I'm not even sure it's a requirement for USB devices to include a serial number. If there was, I would imagine that it would be available in the windows device manager but all I see is the Device Instance ID and Hardware IDs. You might be able to find this information at www.usb.org. It it is stored someplace, i'm sure you would have to use the windows api to read it.
0 Kudos
Message 6 of 11
(4,613 Views)
MAX reads and displays it, so its got to be there some how??????
Doug Ferguson
0 Kudos
Message 7 of 11
(4,600 Views)
Where do you see it in MAX? Is this a converter from NI? I only have a USB modem connected right now and it only shows up in MAX as Com4. Attach a screen shot.
0 Kudos
Message 8 of 11
(4,598 Views)

Doug,

There is currently no way native to LabVIEW to get the serial number information from any of our serial products.  This is a feature that we are considering.  Please file a product suggestion so that we can keep track of the demand for this feature.  The only way to get this information from LabVIEW is by calling the Windows API through a call library function node or by finding the serial number in the Windows registry (where Com ports are located).  You would need to know the com number to get this information from the registry.

I hope this helps,
Steven T.

0 Kudos
Message 9 of 11
(4,564 Views)
Hello Doug,

I was playing around with some of the property nodes and found that you can get a lot of information from the NI-Serial devices with the Interface Description: Interface Information property.  This property returns a string which contains the device name and serial number.  I have attached a VI that parses this string to return only the serial number. 

Please put in the product suggestion anyway, as it would be very usefull to have a property node that performs this action.

Have a great day.
O. Proulx
National Instruments
www.ni.com/support
0 Kudos
Message 10 of 11
(4,561 Views)