LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to create local variables for color boxes?


@RiversDaddy wrote:

Smercurio,

Please don't quote me incorrectly.


I did not. See, I clicked on the "Quote" button to copy your comments, word for word. You made some general statements, but you did not say why. You said that using property nodes is not "good practice" and should be avoided. Why? You gave no reasons. For someone starting out in programming, they're likely to take such statements as mantra, and start programming a certain way, whether it's good or bad.

 

As for my impetus, you should understand that I will ALWAYS fight the premise of so-called absolutes, or near-absolutes, like property nodes are not good practice, or local variables are evil, or the Basic GOTO statement is "evil", or the "SELECT ALL" is evil, or ... you get the point. I respect Ray's stance on this, but frankly I think he's flat wrong on this. No offense, Ray.  Smiley Very Happy 

 

As for the original post, I can't have an answer because the problem has not been identified. What is the OP doing that "doesn't work"? This may have nothing to do with code, but rather operator usage.

Message 11 of 13
(586 Views)

No offense taken... LOL!!

🙂

 

I do agree with what you explained.  Good & Evil are such relative terms... 

 

0 Kudos
Message 12 of 13
(577 Views)

stubbsy90 wrote:

I am using color boxes to represent multicolored LEDs and really need to be able to create local variables for them when using them in state machines? When I do this it does not work. All help is much appreciated. 


Yes, lets get back to the original problem.

 

You statement makes no sense: The capability of creating local variables should not depend on their intended use, right?

 

Are the LEDs controls or indicators? If they are controls, do they have incompatible mechanical actions?

Are the LEDs inside arrays?

 

Sure you can change to color of an LED with a color property node.

Using a value property node only gives you the choice of only two colors.

If you have arrays, you cannot change individual color properties, so you are stuck with two colors overall, and the term "multicolored" is reduced to something that is not very "multi...".

 

 

A boolean indicator should not be abused for more than two possible states!

 

A better approach are colorboxes that look like LEDs. Here the value is the color and we have full flexibility. (Please vote for my idea so it will get implemented in future LabVIEW versions.)

0 Kudos
Message 13 of 13
(561 Views)