How to implement a TON timer like function in Groovy/Java

Viewed 33

Basically, I need to compare two variables and start the timer when conditions met and set a variable to true if the condition sustains a certain amount of time. ( Similar to TON timer in PLC programming) Example: if a > b sustains for 5 seconds, then set c = true, otherwise set c = false

0 Answers
Related