Showing "Time left" or "Time passed" in measurement window while using sequencer
Hello,
I use the sequencer to perform fully automated measurements. However, I need a 30-minute pause between measurements. I've implemented this using the delay function. It would be great for my user if the measurement window displayed how long it is left until the next measurement begins (or how long it's been since the last measurement). Essentially, it shows the elapsed time or the remaining time until the delay is complete. Is there a function block or a known solution for this?
Thanks in advance,
Jonathan
Dear @Jonathan Frey,
the Sequencer doesn’t include a built-in countdown timer for delays, but I do have a few recommendations and example approaches you can try to see if they suit your needs.
One simple option—although it’s not a real countdown—is to record the current time right before the Delay block starts. By adding a Calculation block with SysDateTime("HH:MM:SS") before the Delay, the user can see the start time of the pause and easily calculate when the next measurement will begin.
Another option is to create an actual countdown, where the remaining delay time is shown either in minutes or seconds, depending on what you prefer. I've created a solution using Repetition blocks combined with Wait blocks and Calculation blocks. A variable called RemainingMinutes is set to 30, and a Repetition block loops 30 times. Inside the loop, a Wait block with 60-second timeout displays "Next measurement in 'RemainingMinutes' minutes", then a Calculation block decrements the counter by 1. This updates the notification bar every minute: "30 minutes...", "29 minutes...", etc.
For seconds instead of minutes, change the Repetition to 1800 times and the Wait timeout to 1000ms.
The solution works entirely in Sequencer, updates in real-time, and allows users to skip waiting by pressing Continue. The attached sequencer file contains both approaches.
Please let me know if this was helpful or if you have any other questions.
Best regards,
Attached files: