Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Connection Problems cRio

Solved!
Go to solution

Hello,

 

For my work I try to connect to a cRio 9049 with an attached NI 9205 via the nidaqmx library in python from a Windows 10 pc. So far I didn't have any luck with it. The device cannot be found in python (See my attachment "code-and-error.png").
Something I noticed is, that Device.add_network_device() returns the error for the right IP instantaneously, while it takes the full 10 seconds timeout on a non-existing IP. So I suspect the problem to be that something is blocking parts of the network traffic.
The device is also not recognized by the NI device manager, but by NI MAX and can be fully accessed there. I tried all of my attempts via USB and direct ethernet connection.
I added screenshots of the installed software on the cRio and the host pc (See my attachments "software-cRio.png", "software-cRio2.png" and "software-pc.png").
In the beginning I had some driver incompatibility that I solved by downgrading the daqmx driver to 21.3. I have also run the ni MAX "Troubleshoot Remote System Discovery" and tried to find a solution in the forum and the knowledge base.
If you need more information please let me know. I am thankful for every hint.

 

Thanks a lot.

 

- Simon

0 Kudos
Message 1 of 2
(1,317 Views)
Solution
Accepted by topic author JJSimons

cRIO-9049 has its own controller. You cannot run a python code on Windows to access its peripheral device. The network devices in the DAQmx API are meant for Ethernet-based cDAQ-918x chassis.

If you want to control cRIO from a Windows host using Python, you can use gRPC with NI Software and Hardware. Simply install the gRPC server on the cRIO, then you can run python client API on Windows.

 

However, using gRPC has a huge latency due to network communication. For best performance, you should deploy the code to the cRIO directly.

For LabVIEW, see Take Your First Measurement in LabVIEW Real-Time (Data Logging)

For C programming, see Cross-Compiling ANSI C NI-DAQmx Examples for Linux RT Using Microsoft Visual Studio Code

-------------------------------------------------------
Control Lead | Intelline Inc
Message 2 of 2
(1,310 Views)