Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

DAQmx-Python API for CompactRIO - Device identifier is invalid

I am using DAQmx Python API for configure  the compactRIO with a AO module (NI 9263). The compactRIO (cRIO1 in NI MAX) and AO module can be successfully identified under NI MAX at "Remote System", The AO module was set to "Real-time (NI-DAQmx)" at NI Max. Please see the attached screenshot


When I setup the channel in Python:

import nidaqmx
with nidaqmx.Task() as task:

It showed an error message below:

nidaqmx.errors.DaqError: Device identifier is invalid.
Device Specified: cRIO1


Can anyone help?

Message 1 of 11

The physical channel name is just "Mod3/ao0".

Brandon Streiff ·
0 Kudos
Message 2 of 11

Hi Brandon,


Thank for your reply. I tried "Mod3/ao0". It is still not working. The error below:

"nidaqmx.errors.DaqError: Device identifier is invalid.
Device Specified: Mod3"


I checked this in Labview programming as well. In Labview, it seems the "Mod3" is not showing up when browsing the existing physical channels. But I can browse and set up the physical channel "Mod3" after I building a project and added the cRIO device and modules in the project tree. 


The question is I have no idea how to setup this in Phython (not using Labview), or if any parts I was thinking wrong.


Thanks a lot

0 Kudos
Message 3 of 11



I am trying to communicate with my CompactRIO 9049 using NIDAQmx and C code API.

My C code is extracted from an ANSI C example developed by NI : "Acq-IntClk.c".

When I compile it with MinGW compiler, I have the same error as you : Device identifier is invalid.

I tried "Mod2/ai0" but it doesn't worked.

The devices suggested are all these which are in the section My System, others are not visible (in the section Remote System).


Did you found a solution to this problem ?


Thanks a lot.

Download All
0 Kudos
Message 4 of 11


I´m trying to communicate my cRIO 9047 with python also, using NIDAQmx.

Unfortunately, I´m facing the same issues as you guys the same STATUS CODE : -2002020




And at the NI MAX, the name is the same. As shown for me. 

Did you found the solution to this issue? Is there any clue for this status? I´ve already tried other names... but had no response yet.

Thanks in advance,


Best Regards,
João Gabriel MirandaPython Issue.pngPython Issue_2.png

0 Kudos
Message 5 of 11

Dear Expert,

      Do you have solve your problem? 


thanks a lot


0 Kudos
Message 6 of 11

Did you solve it? I also have the same issue?

0 Kudos
Message 7 of 11

could anyone find a solution? - I have the sameproblem with my CompactRIO

0 Kudos
Message 8 of 11

Did you try to run the code from the Windows host computer?

The code must be deployed to the cRIO RT to run in order to access the hardware in the cRIO. You can do Remote Python Development in Visual Studio Code. A guide for NI Linux RT targets but for C/C++ can be found at Visual Studio Code Remote Development Extension 


Control Lead | Intelline Inc
0 Kudos
Message 9 of 11

Thank you for you reply 

I´m running my code from the Host PC. 

The Code I want to run looks pretty similar like this: 

import nidaqmx
>>> with nidaqmx.Task() as task:
...     task.ai_channels.add_ai_voltage_chan("Mod1/ai0")

 Is there a way to do it without deploying code to the RT System - maybe install something other on the cRIO? 

The code above is not working since the nidaqmx cant find the cRIO in its devices. 

0 Kudos
Message 10 of 11