LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Does thermometer indicator have a high water mark attribute?

Solved!
Go to solution

Can the thermometer indicator place a mark at the highest temperature recorded so far?  My application involves a fluctuating temperature. I want to draw a line at the peak temperature achieved so far. The thermometer "mercury" will continue to fluctuate below this line. Is this possible?

 

thanks

0 Kudos
Message 1 of 2
(3,347 Views)
Solution
Accepted by topic author querty999

Here's one way of doing it.

 

Have two thermometers, one on top of the other.  The one on top has a transparent background, no fill, no ticks or markers.

The one on top will track your max, the one on bottom will track the varying temperature.

Whenever you update the bottom temperature, check if it's greater than the previous max, and update the top temperature if it is.

 

See the attached example.

 

Here are a few details.

Create a thermometer control on your panel.

Setup your default, max and min, etc.

Copy your thermometer.

Edit the copy to do the following.

Delete the label text.

Under Control Appearance, click Show/Hide Parts, and set the options to No Markers, No Ticks, No Fill, and uncheck Show Digital Display.

In the Quick Edit window, select the paintbrush control, and right-click on the background color in the top of the thermometer to set the color to T (transparent).  Right click on the marker in the middle of the thermometer and select a color for your max marker.

To make editing easier, don't put the controls on top of each other in the editor: do it in your code using GetCtrlAttribute() on the original thermometer and SetCtrlAttribute() on the copied transparent thermometer.

 

The attached example demonstrates this method.

 

Message 2 of 2
(3,344 Views)