08-19-2019 05:11 PM
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:
task.ao_channels.add_ao_voltage_chan("/cRIO1/Mod3/ao0")
print(1)
It showed an error message below:
nidaqmx.errors.DaqError: Device identifier is invalid.
Device Specified: cRIO1
Can anyone help?
08-21-2019 08:04 AM
The physical channel name is just "Mod3/ao0".
08-21-2019 10:10 AM
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
11-24-2020 09:34 AM - edited 11-24-2020 09:36 AM
Hello,
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.
05-17-2021 02:59 PM
Hello,
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
INVALID_DEVICE_ID = -200220
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 Miranda
05-29-2022 04:00 AM
11-30-2022 12:32 AM
Did you solve it? I also have the same issue?
01-23-2023 02:17 PM
could anyone find a solution? - I have the sameproblem with my CompactRIO
01-23-2023 04:46 PM
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
01-24-2023 01:44 AM
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") ... task.read() ... -0.07476920729381246
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.