LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Moving colour ramps for UI

Hi,
 
I'm trying to create a color ramp that moves to the continuosly changing setpoint. So, the setpoint range will be green then either side yellow and then red.
 
I can get two needles to show my range and a third needle my user controls, where they have to set it within the range. But I would muck rather have just one needle and they can set it to the green band.
 
Thanks
 
Andrew
 
 
0 Kudos
Message 1 of 15
(3,608 Views)
Hi Andrew,

I don't understand what it is you're trying to do.

Could you post your code so I can see what you've achieved so far?

Thanks
Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 2 of 15
(3,582 Views)
Sarah,
 
Thanks for the interest, here's an example of what I'm trying to do.
 
Please note that battery voltage and temerature is from  analogue inputs of a DAC MX card
 
Thanks
 
Andrew
 
 
0 Kudos
Message 3 of 15
(3,566 Views)
Hi Andrew,

you know, you can stack several controls/indicators on top of each other?

May advice would be:
1) Create your color ramp. I would use an 1d-array of colorboxes.
2) Put on top a slider indicator for your actual value. Adjust the indicator to fit the size of your color ramp. Make the indicator transparent, leaving only the needles visible.
Now you have a needle on top of a color ramp.
3) If the range of the 'good' values changes: adjust the displayed range of the slider indicator by feeding the property node 'data range'!

Hope this helps.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 15
(3,552 Views)

Sorry about coming in late...

What is wrong with the built-in color ramp?

See attached.

(as LV8)

Ben

Message Edited by Ben on 08-01-2006 09:15 AM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Download All
0 Kudos
Message 5 of 15
(3,546 Views)
Hi Andrew,

I had a play around with the properties of a meter and you can control the color ramp with the Scale >> Marker Values[] property. The changes I made to your code demonstrate what I think you're trying to to.

The code is described on the block diagram (hopefully it makes sense!) Just change around the values to get it to behave how you want.

Message Edited by SarahB on 08-01-2006 09:23 AM

Sarah

Applications Engineer | National Instruments | UK & Ireland
Message 6 of 15
(3,540 Views)
You beat me to it Ben 😉
Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 7 of 15
(3,533 Views)
ps I've removed my attachment to make some changes...
Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 8 of 15
(3,521 Views)

Hi Sarah,

Can you post the VI

Thanks

Andrew

0 Kudos
Message 9 of 15
(3,517 Views)
Here you go...
Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 10 of 15
(3,510 Views)