LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue Running Python Code on myRIO 1900 with System Exec VI

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,

0 Kudos
Message 1 of 7
(171 Views)

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.

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 7
(150 Views)

Dear ZYOng,
I hope you are doing well,

 

Thanks for your response, You can find my VI attached.

0 Kudos
Message 3 of 7
(119 Views)

Have you installed python on the myRIO ?? 

Python needs to be running on myRIO for the vi on the myRIO to execute python code. 

0 Kudos
Message 4 of 7
(107 Views)

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,

0 Kudos
Message 5 of 7
(77 Views)

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. 

0 Kudos
Message 6 of 7
(67 Views)

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).

Rolf Kalbermatter
My Blog
Message 7 of 7
(57 Views)