AdvancedHMI Software

General Category => Support Questions => Topic started by: scott.clark on October 30, 2015, 08:22:06 PM

Title: Using BasicLabel to display a Real Value = 0 shows nothing
Post by: scott.clark on October 30, 2015, 08:22:06 PM
I am using a basic label to display floating point values of the Real type.  If the value happens to be exactly 0, then nothing is displayed.  What can be done?

Thanks!
Title: Re: Using BasicLabel to display a Real Value = 0 shows nothing
Post by: Archie on October 30, 2015, 08:47:24 PM
Do you have anything in NumericFormat? I just tested it with 0.1 and 0 in my PLC and I had values show in both cases.
Title: Re: Using BasicLabel to display a Real Value = 0 shows nothing
Post by: scott.clark on November 02, 2015, 05:23:49 PM
I had "#.##" in the NumericFormat Property instead of "0.00"     

Does NumericFormat property do anything else in addition to the specifying the number of decimal places?

Thanks!

Title: Re: Using BasicLabel to display a Real Value = 0 shows nothing
Post by: Archie on November 02, 2015, 05:32:17 PM
Does NumericFormat property do anything else in addition to the specifying the number of decimal places?
It is based on the ToString method. This web site gives a great amount of details on the formats that can be used:

https://msdn.microsoft.com/en-us/library/kfsatb94(v=vs.110).aspx
Title: Re: Using BasicLabel to display a Real Value = 0 shows nothing
Post by: Archie on November 02, 2015, 05:34:51 PM
This is another link that also may be helpful:

https://msdn.microsoft.com/en-us/library/dwhawy9k(v=vs.110).aspx