03-21-2014 10:23 AM
I want to take the following code(the onboard acclerometer) and run it similar to arduino(as in it runs instantely as soon as power activates, without activating NI on my labtop).
How do I do this?
Is it just simply a matter of running the real time loop?
Solved! Go to Solution.
03-21-2014 10:53 AM - edited 03-21-2014 10:54 AM
Hey bobWalt,
What you want is called an RT Startup Application or Startup EXE. Instructions are here.
Let us know if you have any quesitons about this.
Thanks!
-Sam K
Join / Follow the LabVIEW Hacker Group on google+
03-21-2014 11:24 AM
is this in refrence to the following real time:
03-21-2014 11:34 AM
Is that the real time application they are talking about?
03-21-2014 11:47 AM
That document is referring to the LabVIEW Project. When the myRIO target is added to the LabIVEW project there is a Build Specifications section under the myRIO target. You can right click that and add a new Real-Time Application (exe).
-Sam K
Join / Follow the LabVIEW Hacker Group on google+
03-21-2014 12:23 PM
Ok two comments/questions:
1. So I hit run on this it's stored on the myrio correct? Read for power to come in and out to real time it.
2. How do I delete this off the myrio then?
Since it's stored on the rio,for everytime power is connected, how do I take this file off?
Also two quick snapshots of my actions:
03-21-2014 01:38 PM
Hey,
(For clarification I use the work target and myRIO interchangeably below)
It's important to understand the difference between clicking the run arrow on the LabVIEW Front panel vs. deploying an RT Startup application.
When you click the run button on the VI, the VI is compiled for the target, transferred into the myRIO's RAM and run. If you power off the myRIO or run a different VI the previous running code is gone from the myRIO.
When you build a startup exe (under build specs) and right click it and run as startup an executable file is built for the target and stored on the myRIO flash (think hard drive). As you mentioned that executable is there and will run as startup until you tell it not to. So how do you tell it not to?
You have a couple options. If you just want to run a new VI you can click run on the VI front panel and it will prompt you to stop the currently executing startup exe. Your VI will run on the target like usual, but when you reboot the myRIO it will run start running your old startup exe again.
If you want to prevent the startup exe from running (but not necessarily remove it from the myRIO Flash) you can use MAX or the WIF (web interface, type the myRIO IP address into a browser) to 'Disable RT Startup App'. This is particularly useful your your startup exe locks up the target for some reason. This setting will persist until you remove it, so you will not be able to run a new startup exe until you uncheck this box.
If you want to disable the current startup app (but leave it on the target) you can modify the RT-INI on the target, specifically the RTTarget.LaunchAppAtBoot token. More info on this here.
If you want to totally remove your startup exe you can use WebDAV to browse the target file system and delete the exe (make sure to update the target ini if you do this). Alternatively you could simply format the target in MAX and re-install software to remove all traces of your software.
Let us know if you have more questions about this.
-Sam K
Join / Follow the LabVIEW Hacker Group on google+