I have programmed a test that gets the velocity and the torque of the drum motor and they are running fine on the myrio. I tried to make them a SubVi so i can call them from the main VI (running on the computer) and make a report and it's not working .
So my question is how can run a subvi that's in the myrio work on the Main Vi running on the computer ?
You need to treat the myRIO like a separate computer, because it is. So why should you expect a VI you are calling on your PC to be magically ran on the myRIO?
What you need to do is create a program on the myRIO and add to it a communication scheme for sending data to your PC. Personally, I prefer using the standard TCP with the STM library. I know others who prefer Network Streams. Then on the PC side, you just have another VI that just reads that data and stores it somewhere for the rest of your application to use.
i am reading on the STM Library now. This maybe a stupid question but i will ask anyway. If implement your suggestion, so on the PC side if just press the start button would it trigger as well those Vi's on the myrio ?
on the PC side if just press the start button would it trigger as well those Vi's on the myrio ?
Here the same applies: Why should a program on a different computer start because you press a button on your own computer?
The VI on the myRIO should run before you start your PC/host VI!
LabVIEW comes with a lot of example VIs and projects. There are also projects explaining how to use those RIO targets and how to have them communicate with your PC!
(Those examples most often use shared variables, which can get "nasty". The STM library is a good replacement to reach a "more stable" communication between PC and myRIO.)