From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to program myRIO processor with LabVIEW?

Hi,

I am working on a project using myRIO. Now, I have a labview program and it can run very well on PC, with usb connection to myRIO. What I want to do next is to run this LabVIEW program on myRIO processor, without the PC. How can this be realized? Thanks!

 

Even a very simple example of LabVIEW program, such as light up a LED is also helpful, if only it can run independently on the myRIO processor.

0 Kudos
Message 1 of 5
(7,109 Views)

Have a look at the templates. To run the VI on the myRIO processor, all you need is to move it to the right hardware tree in the project. Have you looked at the examples?

0 Kudos
Message 2 of 5
(7,104 Views)

Thank you so much for your reply. I built a project as shown in the attachment picture. Both of the VIs are under the myRIO-1900 in the structure tree. My question is:

1. The VIs run on which processor? The myRIO processor or the PC processor?

2. If the program run on myRIO processor, why it stops running as soon as I disconnect the USB between myRIO and my PC?

3. How to run a program on myRIO independent of PC?

 

Many thanks!

0 Kudos
Message 3 of 5
(7,093 Views)
Well, you display the front panel on the PC via usb, so if you disconnect, the panel can no longer update. This does not mean that it stopped running.
0 Kudos
Message 4 of 5
(7,090 Views)

Hello Aoyu,

 

Ima chime in since i ran into this problem myself just now lol

im still noob myself, so bare with my advise =P

 

1. The VIs run on which processor? The myRIO processor or the PC processor?

According to the pic you linked both of those VI are running on your target devise not your pc, at this stage you should be able to open one or both of those VIs on you PC and see what is happeneing in Real Time

 

2. If the program run on myRIO processor, why it stops running as soon as I disconnect the USB between myRIO and my PC?

From what i understand this is happeneing because you have not set a build specificatgion for your particular VI...

if you right click on Build Specification>Source Files>project Files - add your project file VI by clicking the right arrow to Startup VIs and click build

now you should see a new file under build specs right click on that and click set as sartup and run at startup and a promt windpow should pop up asking you to reboot

*** I still dont fully understand this proccess and i might be wrong but maybe someone else can elaborate a little more***

 

3. How to run a program on myRIO independent of PC?

As vague as this question is i think i can shed some light on the subject...

If you develop a code to run on your PC you most likely will not be able to just drag and drop it to run on your target device...

if you right click and create a new VI under both "my computer" and your "myRIO" and then right click on both the front pannels of each VI you will notice that some of the options that are available on the front panel of the my computer VI will not be available for the front pannel of the myRIO VI...

With that said if you have developed your VI for a PC platform, and drag and drop it under your myRIO and open it you will most likely see broken wires and a list of errors =P

(this happened to me)

Ill share a link to a thread that helped me out with this problem maybe you can find your answer there 😃

Understanding the platform you are developing for

I started posting on page 3 about 1/2 way down you should start there and read the next 2 pages... i think there is some good information there that should help you out with this question 😃

 

GOOD LUCK!

0 Kudos
Message 5 of 5
(7,081 Views)