Author Topic: Leading Zeros / number of chars for Analog Value Display  (Read 1696 times)

Waynew

  • Newbie
  • *
  • Posts: 3
    • View Profile
Leading Zeros / number of chars for Analog Value Display
« on: April 08, 2017, 11:04:43 PM »
Wondering if there is a way to 'fix' the number of digits displayed with the analogvaluedisplay, and pad 'short' values with leading zero(s) ?

Application is displaying PLC Realtime clock value as the time value on the HMI using a series of Analog Value Displays separated by Basic Label characters.   It works fine, just looks a little wonky when the time displays as 23:7 :1  as opposed to 23:07:01


DougLyons

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Leading Zeros / number of chars for Analog Value Display
« Reply #1 on: April 08, 2017, 11:27:45 PM »
For a clock you might want to take a look at this:
http://advancedhmi.com/forum/index.php?topic=1114.msg6170#msg6170

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Leading Zeros / number of chars for Analog Value Display
« Reply #2 on: April 09, 2017, 07:27:07 AM »
You could use a BasicLabel instead of an AnalogValueDisplay then use the ValueLeftPadCharacter and ValueLeftPadLength properties

Waynew

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Leading Zeros / number of chars for Analog Value Display
« Reply #3 on: April 09, 2017, 10:54:04 AM »
You could use a BasicLabel instead of an AnalogValueDisplay then use the ValueLeftPadCharacter and ValueLeftPadLength properties


Perfect!   Thank you, Archie.   Gonna take some time to get familiar with all the 'handles' for the various components................

Very nearly there with my AHMI/RPi3/ClickPLC project - just a couple Linux hurdles left to jump