08-29-2023 05:39 AM
Hello all,
I'm trying to detect all the NI devices connected to my system to retrieve their names and which PXI and slot it is in. I can see it in NI MAX, my SMU is NI PXIe-4140 (see below).
When I run my python code, the library can only detect my switch matrix (NI PXI-2532) (see below).
Is there something I'm doing wrong? if not, is there another library I can use for my purpose?
Solved! Go to Solution.
08-29-2023 06:11 AM
The PXIe-4140 uses the NI-DCPower API, not NI-DAQmx. You need to install that driver via NI Package Manager and the Python library from pypi (see https://pypi.org/project/nidcpower/)
Note that although the PXI-2532 is recognized by NI-DAQmx, support for switches in that API is deprecated (and I believe nonexistent in Python) You should use NI-SWITCH (and the Python library from https://pypi.org/project/niswitch/).
08-29-2023 06:24 AM
Hello Tobias,
Thanks for replying, the reason im using nidaqmx is so that I can get a resource name, as to use NIDCPower to initialise a NIDCPower session a resource name is required; see below
Is there any other way to find the resource name (PXI and slot numbers) with python?
08-29-2023 07:52 AM
You can use NI System Config API (nisyscfg · PyPI)
Use dcpowerscx (Valid Experts for the System Configuration API Functions) as the resource.expert_name
08-29-2023 08:06 AM
This is exactly what I'm looking for. Thank you.