Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Python nidaqmx does not detect all the devices connected to my system

Solved!
Go to solution

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).

Enuker_0-1693305187490.png

When I run my python code, the library can only detect my switch matrix (NI PXI-2532) (see below). 

Enuker_1-1693305424722.png

 

Is there something I'm doing wrong? if not, is there another library I can use for my purpose?

 

 

 

0 Kudos
Message 1 of 5
(3,800 Views)

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/).

Tobias
Principal Software Engineer
Driver Software
National Instruments
0 Kudos
Message 2 of 5
(3,795 Views)

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

Enuker_0-1693308216173.png

Is there any other way to find the resource name (PXI and slot numbers) with python?

 

0 Kudos
Message 3 of 5
(3,790 Views)
Solution
Accepted by Enuker

You can use NI System Config API (nisyscfg · PyPI)

Use dcpowerscx (Valid Experts for the System Configuration API Functions) as the resource.expert_name

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
Message 4 of 5
(3,773 Views)

This is exactly what I'm looking for. Thank you.

0 Kudos
Message 5 of 5
(3,762 Views)