Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading PXI chassis info via .NET

Solved!
Go to solution

I need to be able to fetch info regarding hardware installed in my PXIe-1084 chassis. Basically the same info NI MAX provides. More specifically, looking up the PCI Bus and PCI Device for a given slot number. I found a link for NI System Configuration API which appears to do what I want but no information about what .NET assembly this is in. How can I call this API from a .NET app?

0 Kudos
Message 1 of 2
(1,824 Views)
Solution
Accepted by topic author -DC-

Never mind. Looks like it's in the NationalInstruments.ModularInstruments.ModularInstrumentsSystem assembly:

 

 

using NationalInstruments.ModularInstruments.SystemServices.DeviceServices;

        static void GetPxiStatus()
        {
            using var d = new ModularInstrumentsSystem();
            foreach (DeviceInfo device in d.DeviceCollection)
                Console.WriteLine($"{device.ChassisNumber} {device.Name} {device.Model} {device.SlotNumber}");
        }

 

 

...except this isn't listing all of the installed cards. Ugh.

0 Kudos
Message 2 of 2
(1,812 Views)