LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to obtain a picture constant with color

Solved!
Go to solution

I have seen many Labview program which has a "Picture constant" but with a specific color. I have tried doing it but I just cannot figure out how to get it.

 

Can some one help me

G

0 Kudos
Message 1 of 31
(4,545 Views)

Sounds like you are looking for a Color Box Constant.  It can be found in the Dialog and UI palette, or buried in the Picture Functions subpalette in Graphics & Sound.

0 Kudos
Message 2 of 31
(4,534 Views)

Do you mean a picture constant or a color box constant?

 

The first is the datatype of the data that goes into a 2D picture control. The second is used to specify the color of things. If the later, do a search on the function palette for "Color Box Constant".

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 31
(4,533 Views)

No not really a color box constant. I was trying to have a " 2D Picture Constant". I figured out how to do it.

 

We can actually put the 2D picture in the front panel, and then go to block diagram and convert it into constant and add color to it by pressing ctrl+right click and change color to it.

 

It didnt strike me earlier to try this way. But it works now. Is there any other easier way to do this?

G

 

0 Kudos
Message 4 of 31
(4,529 Views)

Yes you can set the apparent color of a picture constant, but it doesn't do anything useful. If you wire that constant to an indicator the indicator will stay the same default white.

 

What exactly is it that you are trying to do?

 

MIke...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 31
(4,525 Views)

Quick Drop is great... Ctrl+Space Type "Color Box Constant"  "Empty Picture".  🙂



0 Kudos
Message 6 of 31
(4,521 Views)

Hello Mike,

 

I am trying to replicate a program just to understand the nuances of LabVIEW.  One of the prrgram which I saw has the feature to change the front panel color based on when we click. At the block diagram they seem to have a picture constant, which was what I am trying to find.

 

And you are right. The indicator just seems to be at white. I am not sure how they have done it then..

 

Download All
0 Kudos
Message 7 of 31
(4,505 Views)

It looks like what they might have done is drawn the color into a picture color and then turned the control into a constant. With this the colored area will be of a fixed size.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 8 of 31
(4,487 Views)

@mikeporter wrote:

It looks like what they might have done is drawn the color into a picture color and then turned the control into a constant. With this the colored area will be of a fixed size.

 

Mike...


It doesnt seem to work even like that. I went to Advanced- Customize and tried adding an image, and tried changing the color there. In both the cases, it doesnt seem to work.

 

 

0 Kudos
Message 9 of 31
(4,469 Views)

For the code in the screen shots to work there has to be some data in the constant - which means something must have been drawn to it. You're talking about changing the appearance of an indicator, which has no effect on the data it contains. What you did was comparable to changing the background color of a numeric control, it has no effect on the data in the control.

 

What might be confusing you is that the background and the data in a picture control are both visual, but they are still separate.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 10 of 31
(4,466 Views)