취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

Real-time Communication between NI myRIO (LabVIEW) and Python using TCP/IP

I'm using an NI myRIO board programmed in LabVIEW to gather data from IR sensors and other sensors. I want to establish real-time bidirectional communication with Python using TCP/IP. How can I set up this communication to send sensor data to Python and receive control commands for motors from Python to myRIO? Are there any code examples or resources available to help me implement this solution?

Thank you in advance for your assistance!

0 포인트
1/3 메시지
914 조회수

If your myRIO code is developed as a LabVIEW Real-Time Project with the Host code on a PC running LabVIEW, using the myRIO as the Target, you might be able to use Network Streams to get (Host) LabVIEW to interact with the code on the myRIO and pass the data on to Python (running on the Host).  I don't use Python, but I think NI has some ability to call on Python for computations, and certainly knows how to communicate with the myRIO ...

 

Bob Schor

0 포인트
2/3 메시지
867 조회수

The myRIO is in it's basic functionality simply another CompactRIO system. Unless you want to make use of the special myRIO functions to access it's integrated I2C and other hardware interfaces, you don't even need to install the myRIO Toolkit but can work with any CompactRIO installation. The myRIO Toolkit is basically just a special version of the CompactRIO driver with additional support libraries for myRIO specific hardware interfaces and other myRIO specific tools but it is possible to access the myRIO with a standard CompactRIO installation.

 

And NI provides a Python interface to their NI-FPGA driver, which is at the core of the CompactRIO interface to the FPGA systems.

https://nifpga-python.readthedocs.io/en/latest/

 

NI-FPGA is simply the low level C API to interface to any NI CompactRIO (and I believe FlexRIO) hardware device. And the above mentioned Python module is simply a Python wrapper around this C API using the Python ctypes functionality.

 

With NI-FPGA you can access registers (front panel controls on the FPGA main VI), IRQs and FIFOs.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
3/3 메시지
819 조회수