AdvancedHMI Software
General Category => Support Questions => Topic started by: jeffcoll on August 23, 2020, 01:04:15 PM
-
Hi I have a question about the AnalogValueDisplay, I have this working, I currently see a temperature on it. But I can't make it a decimal number. It's 800 degrees now, but it's got to be 80.0 degrees. Also if it is possible I actually want to change the background of the 80.0 depending on with a color. blue/yellow/green/red
-
Set NumericFormat to 0.0
-
thank you, i really looked over this,
is there a way to make the background of the value change color?
-
by customizing as you specified. I do get 1 decimal number. only then do I get 653.0 but must be correct 65.3 ?, I communicate with a modbus-TCP, number of 40001 is now also 653
-
BasicLabel has ValueScaleFactor, I don't think the analog display does, which is weird. You could use the BasicLabel.
I think you are stuck to writing code for changing colors on BasicLabel, something simple like this would work...
Private Sub BasicLabel2_ValueChanged(sender As Object, e As EventArgs) Handles BasicLabel2.ValueChanged
If BasicLabel2.Value > 5 Then
BasicLabel2.BackColor = Color.Beige
Else
BasicLabel2.BackColor = Color.Coral
End If
End Sub
-
The AnalogValueDisplay uses the newer PLCAddress object, so after you enter an address, you can expand it down to reveal the ScaleFactor. Set that to 0.1
The AnalogVaueDisplay changes the foreground color using the ValueLimits, but to change the background you would have to add some code as MajorFault recommends.