From 9:00 AM - 12:00 PM CDT on Saturday, June 6th, will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Customizing the LED Behavior of the CompactRIO

NI InsightCM™ SDK 3.3 Help

Edition Date: December 2018

Part Number: 375191F-01

»View Product Info
Download Help (Windows Only)

Parent Topic: Creating a New Process

The Blink Process palette provides a VI for changing the behavior of the USER LED on a CompactRIO device. You might want to customize the LED behavior to indicate the following actions to those who observe the device in person:

  • A specific error or type of error occurred.
  • A specific action is in progress.

You can implement a few types of NI-developed behavior or implement a custom blinking pattern.

A dedicated process manages calls made by Set mode palette VI

What to Use

  • Set Mode VI
  • Register Timer Event VI

What to Do

Within the action you want to trigger a change in LED behavior, send a routed message to the current process to execute another action whose name you specify. This example sends the LED mode, as well as custom parameters, as the message value.
Tip  If you want to perform an NI-developed LED mode, such as turning the LED on solid, you can wire just the mode as the message value because custom parameters are not required.
When the process receives a CustomBlink message, it parses for and returns the mode and custom blink parameters from the routed message, and then calls the Set Mode VI to execute the behavior.
The message name/Case value, CustomBlink, passes through the case selector terminal so the action can create a callback for the same action.
On way to return the LED to the default behavior is by registering a timer event. This technique ensures the process receives a second CustomBlink message ten seconds later. However, this time, the mode is set to Normal, which restores the default LED behavior.

Available LED Modes

Mode Name Description Use within NI-developed Processes
Normal Blinks at a rate of once every two seconds.
Error Blinks at a rate of two times per second. When a process returns an unhandled error and the device enters Safe Mode, this behavior occurs.
On Lights and maintains an on state. When a device starts up, the USER LED turns on.
Off Turns off and stays off. When the controller sends Stop or Exit message, the USER LED turns off
Custom Performs a user-defined number of blinks at a specific interval. For example, a pattern rate of 5 seconds and a series of 2 blinks results in 2 consecutive blinks every 5 seconds.


For an example of changing the behavior of the USER LED, refer to the USB process, whose source is located at vi.lib\addons\InsightCM\Devices\Shared\USBDrive\main\ When the USB determines a USB drive is inserted in the USB port on the controller, it sends the AccessingUSB message to itself to initiate an action where the Set Mode VI lights the USER LED constantly for two seconds to indicate the controller is aware of the USB drive. The same action registers a timer event to return the LED behavior to its normal state.

Related Information

Blink Process


Not Helpful