|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:
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
|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.
|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.|
|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\Process.vi. 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.