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: 

instant action of power

Solved!
Go to solution

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?

 

 

0 Kudos
Message 1 of 7
(6,754 Views)

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

LabVIEW Hacker

Join / Follow the LabVIEW Hacker Group on google+

0 Kudos
Message 2 of 7
(6,751 Views)

is this in refrence to the following real time:

  1. Open the project you want to use to build the stand-alone real-time application.
  2. Right-click Build Specifications under the RT target and select New»Real-Time Application from the shortcut menu to display the Real-Time Application Properties dialog box.
  3. Complete the following items on the Information page of the Real-Time Application Properties dialog box.

 

 

0 Kudos
Message 3 of 7
(6,743 Views)
  1. realtime.png

Is that the real time application they are talking about?

 

 

  1. Open the project you want to use to build the stand-alone real-time application.
  2. Right-click Build Specifications under the RT target and select New»Real-Time Application from the shortcut menu to display the Real-Time Application Properties dialog box.
  3. Complete the following items on the Information page of the Real-Time Application Properties dialog box.

 

 

0 Kudos
Message 4 of 7
(6,742 Views)
Solution
Accepted by bobWalt

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

 

0.PNG

 

-Sam K

LabVIEW Hacker

Join / Follow the LabVIEW Hacker Group on google+

 

 

Message 5 of 7
(6,740 Views)

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:

realtime2.png

 

 

realtime.png

0 Kudos
Message 6 of 7
(6,735 Views)

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

LabVIEW Hacker

Join / Follow the LabVIEW Hacker Group on google+

 

0 Kudos
Message 7 of 7
(6,726 Views)