From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

In Range For Hold Time

Code and Documents

Attachment

Overview:
Program that shows how to change a color of a slider bar when a condition is met.


Description:
This VI uses a fill color property node to modify the color when the value is between a certain range. As well, using the Elapse Time Express VI we have an extra condition for the value to be the same for
a hold time specified by the user.


Requirements:
LabVIEW 2012 (or compatible).


Steps to Implement or Execute Code:
1. Configure Hold Time.
2. Run VI and move Slide between 0.4 - 0.6.
3. If the slider stays in that range for the Hold Time,
the LED will light and the Slider fill color will change to Red.

 

Additional Information or References:

In Range For Hold Time - LV 2012 NI Verified FP.PNGIn Range For Hold Time - LV 2012 NI Verified BD.PNG
"**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.