07-16-2020 03:36 PM
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?
Solved! Go to Solution.
07-16-2020 04:27 PM - edited 07-16-2020 04:40 PM
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.