Starting My Real-Time Application Without Setting It as a Startup Executable

Updated Jul 26, 2023

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"?
  • My Real-Time application does not always start correctly at boot up. How can I start it without having access to the LabVIEW project?

Solution

There are three common ways of starting applications on Real-Time (RT) targets:
  • 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).
  • 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 configure the VI Server can be found in Configuring the VI Server.
    • Instructions for creating a VI Server application can be found here.
  • 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 below.

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.