BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

blink colours

ins.PNG
0 Kudos
Message 11 of 24
(6,372 Views)
Use "upload/Insert an image" option that is there 3 times right to the smiley icon
0 Kudos
Message 12 of 24
(6,371 Views)

OK, guys, let's get some sanity in this thread!!!

 

Most of what's been posted is pretty meaningless.

 

  • A boolean can be on or off (TRUE or FALSE).
  • In addition, it can also be blinking (while being TRUE or FALSE).
  • You can define the TRUE color and the FALSE color, but the blinking color is yellow and cannot be changed.
  • This means, you need to code around it.

 

If you only want it to alternate between two colors, you need to switch it at regular intervals from true to false. If you want custom colors for true,false, and the blinking colors, the two states of a boolean is not enough and you should probably use e.g. a colorbox. It can be made to look like an LED.

 

Here's a simple example.

 


And now let's see whats wrong with the examples posted so far.

 

 

gpsrt:  blinking is a propery that remains once set until it is unset. There is no need to write the same property over and over every 100ms. You set the blinking property to TRUE to start blinking, and later to false to stop blinking. Since the alternate color is yellow, it does not solve the problem.

 

muks: your LED will switch millions of times per second, alternating between the FALSE and TRUE color. The loops needs a wait. Again, the colors[4] property does not change, so why write it with every iteration of the loop? This property needs to be set only once, and then never again. it belongs outside and before the loop. You can even define the colors, save the VI, and delete the property node completely. The defined colors will remain! Property nodes are expensive, so they should only be written when the values actually change.

Message Edited by altenbach on 08-14-2009 08:13 AM
Download All
Message 13 of 24
(6,354 Views)

Tools>Options>Colors--Custom- Blink foreground and Blink background are .ini defined and take effect without relaunching LabVIEW.  This suggests to me that it would be possible to hack the value at runtime with the right referance.

 

As a side note( the help for the color selections in 8.6.1 is mixed up - right name wrong text)


"Should be" isn't "Is" -Jay
0 Kudos
Message 14 of 24
(6,327 Views)

There is no need to write the same property over and over every 100ms. You set the blinking property to TRUE to start blinking, and later to false to stop blinking.

Thanks Alten,

                    I put 100ms just for wait between iterations.And moreover  I'm not setting it to false to stop blinking.

Thanks
kiranmayi
0 Kudos
Message 15 of 24
(6,299 Views)

 


your LED will switch millions of times per second, alternating between the FALSE and TRUE color. The loops needs a wait. Again, the colors[4] property does not change, so why write it with every iteration of the loop? This property needs to be set only once, and then never again

 

 

I do undestand altenbach. I just answered the question whether the colors can be set with blinking property. I should have been more explanatory and avoided the node inside the loop.

0 Kudos
Message 16 of 24
(6,300 Views)

gpsrt wrote:

I put 100ms just for wait between iterations.And moreover  I'm not setting it to false to stop blinking.


Then the property node definitely belongs outside the loop. It needs to be written exactly once.

0 Kudos
Message 17 of 24
(6,285 Views)

Jeff Bohrer wrote:

Tools>Options>Colors--Custom- Blink foreground and Blink background are .ini defined and take effect without relaunching LabVIEW.  This suggests to me that it would be possible to hack the value at runtime with the right referance.

 

As a side note( the help for the color selections in 8.6.1 is mixed up - right name wrong text)


 

Hey LV Gurus:  Any answer on Jeff's comment?  I know I can set the blinking color using the tools menu.  Can it be set at runtime programatically with a property node of some sort?

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 18 of 24
(6,276 Views)
I believe the ini file color selections only affect new vi's.  I haven't played with it too much yet however these colors must be in the compiled code space.  Can they be accessed programatically?  I could think of several "fun" things to do with access to these parameters. (like a floating logo on front panels or programatically blacking out diagrams without a system key)

"Should be" isn't "Is" -Jay
0 Kudos
Message 19 of 24
(6,248 Views)

tbob wrote:

 

Can it be set at runtime programatically with a property node of some sort?


Not as far as I know. As Jeff said, it doesn't work just upon loading LV, but that doesn't mean that there's an exposed LV interface. It's also possible that the check is done directly on the INI file, although that seems unlikely. This can be checked simply by modifying the INI file.

 

I once posted an example (here) showing how to have dynamic frequency and color for each color, but it requires writing code for every class of control you want to support.


___________________
Try to take over the world!
Message 20 of 24
(6,240 Views)