LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing color of led using property node

Solved!
Go to solution

Hello, i am currently writing a code that takes a random current temperature and compares it to set values. Depending on the temperature, it will display a specific string warning. The problem that i am running into is the led portion. I want the led to light up a specific color based on the warning. (i.e. blue for freezing, red for heat, etc.) From reading other forums related to my problem, i have found that using the colors property node would probably work best, however after reading the help section i am a little confused on how to wire it. Could someone help me with this please? I have attached my code for reference. Thank you in advance. 

0 Kudos
Message 1 of 12
(8,973 Views)

Instead of a LED, use a colorbox indicator. Here the color is the data. Works much better. (You can even make it look like an LED).

 

Have you looked at my VI in our earler discussion about the same thing?

0 Kudos
Message 2 of 12
(8,961 Views)

i would try that but the assignment says to use an led specifically. 

0 Kudos
Message 3 of 12
(8,953 Views)

It still does not explain why you are not using my code for the rest of the problem. Keep it simple! You can use the colorbox value from my code and wire it to your LED color property node, right?

 

To write to a property node, it needs to be in write mode. Currently yours are in read mode. Just right-click!

 

Ans since you are changing the LED color, it does not even need to be wired to the code, because the boolean value is irrelevant.

 

 

0 Kudos
Message 4 of 12
(8,940 Views)
Solution
Accepted by topic author Kmfood123

Here is what I meant. Of course you should only write to the property node if the color value has actually just changed. Easy to do with a feedback node. Try it!

 

 

Message 5 of 12
(8,930 Views)

Im sorry for not trying that earlier, i must have just glanced over  it last time i saw it. Ill go try that now. Really appreciate the help and quick reply. Thank you. Ill let you know how it goes.

0 Kudos
Message 6 of 12
(8,925 Views)

Note that in order to use "unbundle by name", you need to define labels for the cluster elements in the array constant. Else just use a plain unbundle operation.

 

Also, if you use any part of my code, you need to be able to fully explain it so make sure you understand the reason for every part.

0 Kudos
Message 7 of 12
(8,921 Views)

I think i got it working, I did not end up adding the property node however. Thank you for your help once again. I have one question however, for the no warning string, i would like to make it between 32 and 75 (inclusive), and the high temp string between 75 and 100 (exclusice). The code currently does not do that. Is there a way to make it do that? Screen Shot 2017-04-13 at 12.27.34.png

0 Kudos
Message 8 of 12
(8,916 Views)

What's the digital resolution of the temperature measurement? Just tweak the boundaries accordingly.

Message 9 of 12
(8,887 Views)

how do i do that?

0 Kudos
Message 10 of 12
(8,885 Views)