Author Topic: When value is 0, BasicLabel shows nothing  (Read 857 times)

Uncle3MTA3

  • Newbie
  • *
  • Posts: 7
    • View Profile
When value is 0, BasicLabel shows nothing
« on: October 01, 2015, 10:47:24 AM »
This is probably a simple problem, but I'm just not seeing what I'm doing wrong.
I have a BasicLabel that I use to display the speed of a conveyor. I use the ValueScaleFactor of 196.85 to convert the speed from meters per second to feet per minute. When the conveyor is running everything is fine, the number is displayed correctly and updates when the conveyor speed changes. However, when the conveyor stops, the display disappears. I can only assume this is because the value becomes 0 (when the conveyor is stopping, I can see values down to 0.1 ft/min, which is my display resolution based on the NumericFormat being ##.#).
Is there some setting that I am missing to display the 0?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: When value is 0, BasicLabel shows nothing
« Reply #1 on: October 01, 2015, 11:08:40 AM »
Did you by any chance accidentally put an address in the PLCAddressVisible property?

I would also try to put a breakpoint in BasicLabel.vb at line 386 (UpdateText sub), then step through with F10 to see if it gets to line 403

StuartBrown

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: When value is 0, BasicLabel shows nothing
« Reply #2 on: August 30, 2019, 02:20:41 AM »
The NumericFormat is causing the issue:-

I had a similar issue with :-
 
    NumericFormat =  ##,### the issue occurs.
    NumericFormat =  <Blank> the issue is gone.
    NumericFormat =  ##,##0 the issue is gone - zero values display correctly and non-zero values still display correctly.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: When value is 0, BasicLabel shows nothing
« Reply #3 on: August 30, 2019, 04:22:01 AM »
With digit count after a decimal, the NumericFormat would be 0.0