Western NY LabVIEW User Group

cancel
Showing results for 
Search instead for 
Did you mean: 

Blink Colors in LabVIEW

Anybody know how to change the blink foreground and background color properties programmatically at run-time versus at edit time using the tools>options>colors?  I couldn't see it in the properties for a control/indicator.

Scott Rogers
Sr. DSM
Western NY
0 Kudos
Message 1 of 14
(32,581 Views)

Under Boolan Indicator, property there is a blinking  True False option.  Do you have an  example you can post?

Greg S.

Greg
0 Kudos
Message 2 of 14
(17,878 Views)

Thanks Greg.  I'm aware of the boolean property to turn the blinking on/off.

I'm looking for a way to set the blink colors (background and foreground) at run-time (i.e. programmatically).

It seems like the only place to set these properties is during edit-time in the tools>options>colors menu:

blinking color properties.JPG

Scott Rogers
Sr. DSM
Western NY
0 Kudos
Message 3 of 14
(17,878 Views)

Scott - Use the Color[4] Property  then uses Hex decimal values to control the color and Blink Property

The control is passed by 1 d array. Top # being Foreground Bottom # being the background. It feeds a color[4] property node of the indicator. In Hex RRGGBB equals Red Red, Green Green, Blue, Blue. Red Light would be FF0000 (h). Green would be 00FF00(h). Initial constant is set up in decimal mode. I found it easier to hex.

You give the True/False Test Results, then VI changes the color.

I hope this helps. !!!

Greg



Greg
0 Kudos
Message 4 of 14
(17,878 Views)

Thanks again Greg.  This still doesn't quite do what I am looking for.  I want to change the blinking color, not the [true], [false], [true to false], or [false to true] colors.

Attached is an example of what you were thinking of.  Click the blink button and notice the current (and default) blink color is yellow, while the button colors are red, green, blue, and magenta.

It is this blink color, that you can change in the LabVIEW tools>options>colors dialog that I'd like to change programmatically at run-time.

I'm also checking with NI Support.  In the spirit of helping ourselves, I thought I'd start with the LabVIEW community.  Thanks for steppin' up.

Scott Rogers
Sr. DSM
Western NY
0 Kudos
Message 5 of 14
(17,878 Views)

Hi Scott,

Can you post the example in 8.5. I don't know the answer. I'm just curious to see how you make an indicator blink.

David

David Grucza, CLD
0 Kudos
Message 6 of 14
(17,878 Views)

8.5 version attached

Scott Rogers
Sr. DSM
Western NY
0 Kudos
Message 7 of 14
(17,878 Views)

If you change the blinking colors there is a line like "blinkFG=006666FF" added to the Labview.ini file. If there is a way to reload this file it should be possible to programatically edit it before reloading. Otherwise I don't see a way to access the Labview API to change the setting in memory.

This is interesting: http://wiki.lavag.org/LabVIEW_configuration_file/Colors

David Grucza, CLD
0 Kudos
Message 8 of 14
(17,878 Views)

Intersting Challenge.  I could not figure out a simple and elegant way of solving this problem.  So instead I used "old school" LabVIEW programming and a brute force method to accomplish the same effect.  In short don't use the blink property instead simply change it's color back and forth.

There is an example program in the NI Forums that uses the OpenG libraries to seemingly do exactly what you are asking for.

Message 9 of 14
(17,878 Views)

Changing the control color using propery nodes may not work if using Dialog controls/indicators.  Alternate brute force method, use property node to toggle items visibility (especially if everything but text is transparent).

0 Kudos
Message 10 of 14
(17,878 Views)