04-10-2024 05:05 PM
Hope you are all doing well,
I'm trying to execute Python code on myRIO 1900. My research indicates that Python node blocks aren't compatible with myRIO project creation. As an alternative, I explored using the System Exec VI. This VI, when integrated into the design, supposedly grants access to a command window (cmd) for running Python scripts.
However, when I use the System Exec VI on myRIO 1900, it executes without errors or warnings, but it doesn't function as expected. I'm unable to open the cmd window using this VI.
Can anyone help me with this?
Thanks for your time and support,
04-10-2024 06:30 PM
VI is running in myRIO, no window will be opened on the host PC.
Please attach your project including your VI and Python script for us to understand better.
04-11-2024 01:32 AM
Dear ZYOng,
I hope you are doing well,
Thanks for your response, You can find my VI attached.
04-11-2024 03:55 AM
Have you installed python on the myRIO ??
Python needs to be running on myRIO for the vi on the myRIO to execute python code.
04-15-2024 01:51 PM
Dear dkfire,
I hope you are doing well,
No, I have not, Actually, I do not know how to install Python on myRIO, I searched a lot but I was not able to find sth work for me. Could you please tell me how I can do that?
Thanks for your time,
04-16-2024 02:34 AM
Sorry, but I don't know how or even if you can. Python has to be build for the linux version and the cpu in the myRIO.
You could try to ssh into the myRIO and see if there are any python package to be installed from the linux repo.
04-16-2024 07:17 AM - edited 04-16-2024 07:18 AM
If you don't run a dead old LabVIEW system on your myRIO, it should be not more than using a SSH client like Putty or WinSCP and logging into a shell on your myRIO, then issuing the commands:
opkg update
opkg install python
or possibly use python3 instead.
Of course that all assumes that your myRIO is actually able to connect to the internet (and the NI package feeds).
05-14-2024 05:27 PM
Dear rolfk,
I hope you are doing well,
I tried what you mentioned, but I faced the following errors:
05-15-2024 03:22 AM
Your controller probably has no internet access. If you can enable Wifi on the myRIO, it would probably be easiest. Otherwise you have to temporarily bridge the myRIO USB virtual network adapter in your Windows system with the network card that is connected to internet.
05-15-2024 11:48 AM
Dear Rolf,
I hope you are doing well,
Thanks for your response, The Device was connected through the WIFI, and I even checked using ping google.com.
Thanks for your time and support,