08-14-2009 07:07 AM
08-14-2009 07:08 AM
08-14-2009 10:06 AM - edited 08-14-2009 10:13 AM
OK, guys, let's get some sanity in this thread!!!
Most of what's been posted is pretty meaningless.
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.
08-14-2009 04:43 PM
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)
08-17-2009 01:20 AM
Thanks Alten,
I put 100ms just for wait between iterations.And moreover I'm not setting it to false to stop blinking.
08-17-2009 01:39 AM
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.
08-17-2009 10:41 AM
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.
08-17-2009 02:05 PM
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?
08-18-2009 09:06 AM
08-18-2009 10:44 AM
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.