To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example shows how to make a custom blinking control where you can set the blinking size and color. It uses two different methods described both in the Description section and on the front panel of the VI.
Description
There are two methods used in this VI of creating a custom blinking button. These are the "Double Button" method and the "Classic Button Blink" method.
The Double Button method uses two stacked buttons. The top button is a normal modern Boolean control. The background button is a classic Boolean indicator. You can select the blinking colors with the Colors[4] Input. If you select transparent as the Off Blink color, the button will blend into the background. A shift register is used to toggle the Background Button on and off to make it blink. You can use this method under ANY control.
The Classic Button Blink method uses a classic Boolean control which blinks the border color for both the true and false cases of the button. The code is more complex than the Double Button method but the front panel is also simpler.
In both methods, a while loop with a shift register is used to change the value of a boolean after each loop iteration. This allows the blinking effect to occur.
Use the Reorder button on the front panel to place or move buttons to the front and back. You can configure the Background Button with this example, then copy it to the front panel for another application.
Requirements
Steps to Implement or Execute Code Additional Information or References
Additional Information or References
Front Panel
Block Diagram:
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.