08-09-2021 02:45 PM
Hey everyone!
I’ve been doing a control & acquisition project using myRIO and LabVIEW. Now I want to add python in my project to do some data analysis and even machine learning.
However, I found that LabVIEW’s Python Node is not supported on real-time targets.
Is it possible to run python script along with LabVIEW on myRIO?
Any suggestions?
Solved! Go to Solution.
08-23-2021 08:18 PM
The myRIO Operating System is called NI Linux Real-Time. It has a specialized Linux kernel for Real-Time processing. It is highly unlikely that any currently-existing Python distribution can be loaded and incorporated into this OS. Without a Python interpreter running on the myRIO, you will not be able to run a Python script there.
Bob Schor
09-08-2021 02:33 PM
Thank you, Bob!
Now I decided to add myRIO as a network drive to my PC and run Python scripts on my PC.
09-09-2021 08:53 AM
Sounds like a good plan. I'm not quite sure what you mean by "add myRIO as a network drive to my PC" -- I assume you mean to "Add Network Drive" on your PC, and let the PC do file I/O on the myRIO. Given that the PC is (probably) running Windows, and the myRIO is definitely running Linux, I regard this as "dangerous". I've successfully used Network Streams to pass data back and forth between Host (PC) and RT Target (myRIO, PXI, etc.). I'm typically using the RT Target for Data Acquisition and Control, and never saving appreciable data there (maybe some configuration files, generated on the RT device for the RT device), and doing all the File I/O (typically saving data for later analysis on the PC) on the PC. But I'm a "Nervous Nellie", especially when it comes to Linux/PC interactions ...
Bob Schor
01-07-2022 11:46 AM
Hey, Bob.
Sorry for the late reply.
Yes I’m working with a Windows PC and myRIO.
I attached a USB flash drive to the myRIO via a USB hub. And I save all my acquired data as TDMS files on that flash drive. And I use Network-published shared variable for storing and displaying my data.
Everything is working ok now. But I’m wondering if I’m doing this wrong. Because I read on this forum that there are better ways for data communication than NPSV. Now you’re saying you’re using Network Streams. Could you please elaborate on that. Or point me to some resources?
Thanks!
01-07-2022 11:53 AM
I found this NI document for “
Streaming Data Using a Network Stream”. It seems to be a good start point.
01-07-2022 10:25 PM
Here's a link to an old (2013) post of mine -- be sure to read the entire thread, because the "solution", as I recall, has a bug in it ...
Bob Schor
01-09-2022 02:59 AM
Thanks, Bob!