Example Code

Programmatically List Firmware and Serial Number of Each Device

Code and Documents

Attachment

Using the System Configuration API, you can get a list of everything connected to a system. This includes many things you do not typically thing about, like networked devices, simulated devices, and device signatures that used to be connected but are not any more. To list all of the devices currently present on a system given a type of bus, try this snippet of code:

Programmatically Retrieve Firmware Versions.png

This VI filters all of the hardware objects for only devices that are installed and functioning.

- Regards,

Beutlich

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
K1200LT_rider
Member
Member
on

I tried running it after selecting PCI, System and USB.  It won't run without getting the following error:

Retrieve FW VI error popup.PNG

Then, looking at the code, I saw some strange characters in the code.  Any idea what causes this?  I've never seen this happen before.  I'm using LV 2011, SP1, with the latest patch installed.  I just experimented by closing 2011 and opening 2010.  I put something on a blank block diagram, and the help window shows the same type of strange characters in it.  Time to do some searching on the forums to see what's going on now.  Ugh.

Retrieve FW VI strange characters.PNG

Beutlich
Member
Member
on

It looks like the VI was corrupted or something, or maybe the System Configuration API.

What happens when you populate the VIs fresh from the pallete? Can you get a simple example for the System Configuration API to work? Have you tried redownloading the VI or importing the code from the VI snippet image?

- Regards,

Beutlich
Contributors