Author Topic: Circulat Progress Bar  (Read 2173 times)

Jaguar

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Circulat Progress Bar
« on: September 25, 2020, 08:33:17 PM »
I have a counter (T4:1) and want to show the progress of accumulated time of the counter. Dragged  a Circular Progress Bar from toolbox to the Main form. On address value, entered T4:1.ACC. Maximum and Minimum values are defaulted to 100 & 0 respectively.  Progress Bar does not show anything. Do I have to enter any other parameters on the properties page?

This is the first time, I am using a progress bar. Would appreciate help!

MajorFault

  • Guest
Re: Circulat Progress Bar
« Reply #1 on: September 25, 2020, 09:19:53 PM »
I would first use those addresses in a BasicLabel to make sure you are communicating first.  Then if that works, move on.

Jaguar

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Circulat Progress Bar
« Reply #2 on: September 25, 2020, 09:37:59 PM »
The progress bar does not display anything. I have a digital panel meter for entering the time (PRE) for that timer and it works. As I wrote earlier, I entered T4:1.ACC for the progress bar. Do I have to add any other parameters?

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Circulat Progress Bar
« Reply #3 on: September 26, 2020, 12:43:58 AM »
T4:1.ACC should be sufficient, just try adjusting its ScaleFactor inside the PLCAddressValue to match your timer's time base and preset, similar to this:

- Time base 1, preset 10 --> ScaleFactor = 10
- Time base 0.1, preset 10 --> ScaleFactor = 100
- Time base 0.01, preset 10 --> ScaleFactor = 1000

Also increase the PenSize from default 4 to 10 or 20, so you can see it easier.

Jaguar

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Circulat Progress Bar
« Reply #4 on: September 26, 2020, 08:25:06 PM »
Superb Godra! Thank you very much!

Another question: Now the time base is 1 second. So, for an hour, when I enter PRE time on DigitalPanel meter, I enter 3600. Is there a way, I can write multiplier, like 60*60 in the properties of the DigitalPanel meter, so that when I enter 1,  the value goes to PLC PRE as 3600?

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Circulat Progress Bar
« Reply #5 on: September 27, 2020, 02:19:25 AM »
What you want is a little bit pointless since if you can type 1 then you can as well type 3600.

Otherwise you would have to deal with KeypadScaleFactor (set its value to 0.000278) for writing and the ScaleFactor of the PLCAddressValue for reading.

Jaguar

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Circulat Progress Bar
« Reply #6 on: September 27, 2020, 09:05:48 AM »
Good Morning!

Thank you very much Godra for your response! I understand, what you said. My idea is also to know new features, which I can use, if I need to.

Regards,

MajorFault

  • Guest
Re: Circulat Progress Bar
« Reply #7 on: September 27, 2020, 10:52:03 PM »
... like 60*60 in the properties of the DigitalPanel meter...

Good luck getting expressions in AHMI.  :)

Jaguar

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Circular Progress Bar
« Reply #8 on: September 29, 2020, 05:44:04 PM »
@Godra & @MajorFault,

For the Circular Progress bar, I am having issue with the % value displayed, when completed.

For example I set the timer PRE to 20 seconds. The Circular Progress bar is tied to ACC of that timer. When the timer starts, the progress bar starts with 0% and then when ACC of the timer reaches PRE of 20 seconds, the  progress bar shows and stops at 20%, not 100%. The scale for the Progress bar is 1 and Maximum and Minimum have been set to 100 & 0. Should I have to change any setting for the Progress bar?

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Circulat Progress Bar
« Reply #9 on: September 29, 2020, 08:28:15 PM »
With your timer accumulator going from 0 to 20 you are looking to cover the full circle, so you need to divide the full circle in 20 equal slices which will result in 5% of the circle being covered every second.

With Minimum = 0 and Maximum = 100 the full circle goes from 0 to 100, so you can use % as ValueSuffix and should set ScaleFactor to 5.

With Minimum = 0 and Maximum = 20 the full circle goes from 0 to 20, which would represent seconds and you should set ScaleFactor to 1 but shouldn't use % as ValueSuffix then.


Jaguar

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Circulat Progress Bar
« Reply #10 on: September 29, 2020, 09:43:10 PM »
@Godra, Thank you very much for explaining in such a detail! Really appreciate.

My question is now; every time, when a new PRE value for the timer is entered, then one has to change either Maximum value or Scale Factor? Is it possible so that Maximum value is automatically filled in from PRE value entered? Do you think one has to write code for that?

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Circulat Progress Bar
« Reply #11 on: September 30, 2020, 02:33:22 AM »
See this topic and just remember that instead of Meter2 you would be dealing with CircularProgressBar:

    https://www.advancedhmi.com/forum/index.php?topic=1338.0

MajorFault

  • Guest
Re: Circulat Progress Bar
« Reply #12 on: September 30, 2020, 11:48:49 AM »
Or just leave as 0-100% and scale in the PLC. 

Jaguar

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Circulat Progress Bar
« Reply #13 on: September 30, 2020, 05:28:08 PM »
Awesome Godra! The guidance in Archie's link, you sent, was so easy to follow. Great work! Really thankful what you All do!