Display of countdown timer

(this problem is a bit difficult to explain, but here goes…)

We have a PAC Control program that uses a System Clock (which is the number of seconds since starting the program, always increasing) that is used to calculate the Cycle Time Remaining. The calculation of Cycle Time Remaining is dependent upon a recipe-specific variable called Max Time. Here is the block that calculates Cycle Time Remaining:

Basically the program has 150 seconds to complete the task (dispense a number of lbs). When it completes that task, the program turns off the feeder and goes to this block and “runs out” the remaining time on the clock.

And the program works flawlessly in terms of performance. However, in groov View, we want to see the Cycle Time Remaining actually counting down to 0. Instead, we see it ‘frozen’ at the last known value (when the task of dispensing the weight was completed). In the screenshot below, the task was completed with 128 seconds remaining on the clock, so it just displays that value instead of counting down. Once the 128 seconds are up, the program moves back to the start and repeats, and puts 150 seconds back in the Cycle Time Remaining.

Is there something we can change in our program to get it to display an actual ‘live’ countdown timer in groov View?

the issue here is that you are using a fixed delay. The delay gets processed on the controller and does not “count down” or “count up” visually like the timer functions do. The process actually stops at the delay until completed.

What you want to do is use a down or up timer. Move your cycle_time_remaining_B to a down or up timer, then start the timer and display that timer.

That should do the trick

I think @Jakes has the solution.
Just keep in mind that groov View cant display timers, so be sure and put a ‘move timer to var’ command in a chart that is running (with a delay) so that the variable is updated and thus groov View will show the delay ticking over.

Are you sure about that? I’m pretty sure I am displaying timers on my groov. They just aren’t displayed very accurately since the scan time is slow.

Yup, your right. I’m wrong.

I thought I found a secret hidden way (bug/feature) to display timers for a sec. :sweat_smile:

1 Like