Example Code

Programmatically Enable/Disable RT Startup Application Using RealTime for LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • CompactRIO|SingleBoardRIO

    Software

  • LabVIEW Real-Time Module
  • LabVIEW

Code and Documents

Attachment

Download All

Overview

This VI is an example of how the ni-rt.ini file can be modified on a Real-Time controller programmatically from a host PC.

 

Description

The VI should be run from a host PC; it uses WebDAV to copy the controller's ni-rt.ini file to a specified location on the host, edits the StartAppAtBoot token, and then uses WebDAV to replace the ni-rt.ini file on the controller with the new settings. This VI is designed to work with a Linux RT controller such as the myRIO or cRIO-9068, to use it with a VxWorks target, you will need to change the path to the ni-rt.ini file.

 

Requirements

Software

LabVIEW 2013 (or compatible)

LabVIEW System Configuration API

LabVIEW Real-time module

 

Hardware

A Linux RT Target (other targets possible but changes will need to be made.)

  

Steps to Implement or Execute Code

  1. Ensure you have a connection to a Linux RT target.
  2. Choose your target using the "Session In" dropdown box. Depending on your controller settings, you may have to initialize your connection first with the appropriate login information.
  3. Change the boolean control on the front panel to either disable or enable the RT Startup App.
  4. Run the VI

 

Additional Information or Reference

1-388BD.png

DisableStartupApp 2013 NIVerified Block Diagram

 

1-388 True.png

After pressing "StartupApp?" ni-rt.ini file.

 

 1-388 False.png

If not press "StartupApp?" ni-rt.ini file.

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

 

Rob B
FlexRIO Product Manager

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Active Participant
Active Participant
on

Looks really usefull. Good job!

Piotr Kruczkowski
Certified TestStand Architect
Certified LabVIEW Architect