This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

How Do I Start My Real-Time Application without Setting It as a Startup Executable?

Updated Nov 9, 2017

Reported In

Hardware

  • cRIO-9024

Software

  • LabVIEW 2015 Real-Time Module

Issue Details

My real-time VIs are completed, and now I am preparing to build and deploy a real-time executable. Since real-time targets typically do not have user interface, how do I start my real-time application without choosing Set as Startup?

Solution

There are three common ways of starting applications on RT targets.
  1. Idle State in a State Machine - A common LabVIEW architecture is the state machine A state machine is a way to implement a flow chart in LabVIEW code. In your RT application you would use a state machine and make the first state an "Idle" state. The application will still be Set as Startup but will remain in the idle state until the user sends a command (in the form of a TCP, UDP, or shared variable communication).
  2. VI Server - VI server can be used to dynamically call a VI remotely on a RT target. The VI to run remotely along with all dependencies will need to be deployed to the RT target in order to successfully run the VI. This can be accomplished by creating and deploying a source distribution. Instructions on how to create, deploy, and dynamically call a VI in this way can be found within here.
  3. Remote Front Panel - Remote front panels allow users to view and control the VI front panels remotely from LabVIEW or from a web browser without any programming. Essentially the RT target will broadcast the front panel of the VI and if enabled, allow the user to interact with the VI through a web browser (Internet Explorer, Firefox, etc.). Instruction on how to enable and configure a remote front panel for a RT target can be found here

Additional Information

The advantages and disadvantages of each are discussed here.

Option 1: Idle State in a State Machine 

Advantages - The executable always loads at startup.  If you store (in a file) which state the program is in, then after a power surge the program can return to that specific state.  The program also starts quickly because it is only waiting for a command.

Disadvantages - A host-side program is required to send commands. If you use shared variables, the RT target will need variable client support installed.

Option 2: VI Server 

Advantages -  A startup executable is not required in this architecture.

Disadvantages -  When opening a reference to the VI with VI Server, it takes time to load the VI into memory, thus a slower reaction time to start. A host side program is required to make VI Server commands. Additional setup is needed to configure VI Server.

Option 3: Remote Front Panel

Advantages - A host side program is not needed to start the VI. The VI is still built into an startup executable, but typically a button on the RT VI begins the test program. With the purchase of more remote front panel licenses, more than one user can view the remote front panel. Additional remote front panel licenses are not necessary LabVIEW versions 2011 or later. Be sure to activate your remote front panel licenses for Real-Time.

Disadvantages - Because RT targets are meant to be headless, no programmatic information about the front panel is stored on the controller. Thus it is not advised to manipulate the front panel with property and method nodes.

WAS THIS ARTICLE HELPFUL?

Not Helpful