LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Feeding hex value into a color property node throws error

Solved!
Go to solution

Hello all,

 

First, thank you so much for all the help with a complete noob here.

 

I'm trying to simply figure how to throw a hex value at a color propery node to change the background color of a numeric indicator. I think I have the correct propery, the numtext.bgcolor.

 

I'm trying in a case structure in a simple example, to use a numeric constant that I set to Hex for the color code I want...and it throws a error 1077.

 

Here is an image of what I'm trying to do and the error....any suggestions where I'm going wrong?

 

Trying to change bg color block diagram

And the error:

 

Error trying to change bg on numeric indicator

Thank you in advance,

 

cayenne

0 Kudos
Message 1 of 13
(7,266 Views)

Don't attach huge images that are mostly white background. Attach your actual VI instead.

 

What is the datatype and value of your diagram constant? Colors should typcially not be larger than 00FFFFFF.

0 Kudos
Message 2 of 13
(7,263 Views)

Sorry....I thought they were small images....but I'm on a new, pretty high resolution monitor..that might have done it, and I didn't notice the size.

 

Here's the sample VI i'm trying.

 

In the case, I've tried for one case to use a hex number constant...the other case is a decimal..just trying both out...both fail with same error.

 

 

0 Kudos
Message 3 of 13
(7,259 Views)

The VI you have attached does not have any property nodes and does not resemble anything in your pictures above. Try again.

0 Kudos
Message 4 of 13
(7,258 Views)
Solution
Accepted by cayenne

The value you are inputting is invalid, because it is too big. LabVIEW expects the RGB colors in the range 000000h (black) to FFFFFFh (white) and all combinations in between. The number you show in the screen shot is bigger, hence the error.

 

If you wan to experiment wire a color box control to a numeric indicator (U32) and set the display format for Hex.

David C
Message 5 of 13
(7,247 Views)

There are valid colors outside x000000 and xFFFFFF, so the above statement is not completely accurate. (see here). ... and tha's why I said "typically" above. 😉

 


cayenne wrote:

I'm trying to simply figure how to throw a hex value at a color propery node to change the background color of a numeric indicator. I think I have the correct propery, the numtext.bgcolor.

 


You seem to have some serious confusion. All the property node expects is an U32 integer in the correct range, it does not matter how it is formatted in the display, that is just cosmetic. Only the value is important.