boyracer38 Posted December 1, 2004 Report Share Posted December 1, 2004 Im trying to change the colour of an led, depending on the number selected from a dial. I'm using a case structure, with a property node linked to the LED, with the property BoolText.FGColor. This should change the forecolor of the LED? If i feed the property node a number representing a colour eg RRGGBB. On running the VI, an error is thrown. I think its due to the way im trying to specify the colour. 'HELP' says it should be hexadecimal... how do i do this? Quote Link to comment
ahlers01 Posted December 1, 2004 Report Share Posted December 1, 2004 Im trying to change the colour of an led, depending on the number selected from a dial.I'm using a case structure, with a property node linked to the LED, with the property BoolText.FGColor. This should change the forecolor of the LED? If i feed the property node a number representing a colour eg RRGGBB. On running the VI, an error is thrown. I think its due to the way im trying to specify the colour. 'HELP' says it should be hexadecimal... how do i do this? 2816[/snapback] If you want to change the color of the LED use the the property node 'Colors[4]'. It is an array with 4 clusters, each cluster containing two U32 numbers for the FG and BG colors. The first two elements are the colors of the ON and OFF state of the LED. The remaining two are probably for the transitional states of the BOOLEAN LED, you probably won't need them. The BoolText.FGColor would change the FG color of the boolean text, but that is not writable in a running VI (go to the Context Help and click 'Click here for more help') For the colors it is very convenient to use the 'Framed Color Box' (last item int the FP Numeric pallette) or the 'Color Box Constant' (first item in the BD 'Numeric--Additional Numeric Constants' pallette), since you can use the color selection dialog to select values. Quote Link to comment
nusimar Posted October 26, 2005 Report Share Posted October 26, 2005 If you want to change the color of the LED use the the property node 'Colors[4]'. It is an array with 4 clusters, each cluster containing two U32 numbers for the FG and BG colors. The first two elements are the colors of the ON and OFF state of the LED. The remaining two are probably for the transitional states of the BOOLEAN LED, you probably won't need them. What are theses "transitional states"? Can I change the color of a blinking led? (eg. blink between green and red) Quote Link to comment
Mark Balla Posted October 26, 2005 Report Share Posted October 26, 2005 What are theses "transitional states"?Can I change the color of a blinking led? (eg. blink between green and red) You can pretty much ignore the transitional stats. I was unable to get them to show on the front panel. As for blinking you could put the color property node in a while loop and swap the colors around. Download File:post-584-1130342239.vi Quote Link to comment
dimes1827 Posted October 27, 2005 Report Share Posted October 27, 2005 For the colors it is very convenient to use the 'Framed Color Box' (last item int the FP Numeric pallette) or the 'Color Box Constant' (first item in the BD 'Numeric--Additional Numeric Constants' pallette), since you can use the color selection dialog to select values. nice! thanks for the tip regarding the COLOR BOX CONSTANTS! i had it manually derived using the paint brush and then shown its value to the numeric indicator and then placed in a [4]array of cluster[2].. whew!nice! color box constants! hehe transitional states - this is the FALSE to TRUE (LOW to HIGH in pulse) or TRUE to FALSE (HIGH to LOW) change of boolean values.. Quote Link to comment
WMassey Posted October 27, 2005 Report Share Posted October 27, 2005 transitional states - this is the FALSE to TRUE (LOW to HIGH in pulse) or TRUE to FALSE (HIGH to LOW) change of boolean values.. :question: Has anyone ever found a use for the Boolean transitional state colors? Are they ever actually visible? Quote Link to comment
B Chavez Posted October 27, 2005 Report Share Posted October 27, 2005 They are visible when you have the mechanical action set to "Switch When Released" or "Latch When Released." When you click the boolean and hold, the "False to True" or "True to False" colors will be shown. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.