Hi, I've been lurking for about a month now and via the search, I've been able to string together a basic micro820/PV800 project. I've got a simple program that turns a motor on and off with a TONOFF timer, with variable pause/run times being set by the user via the HMI and converted into values. See attached image.
What I now need to do is be able the program to take in a new input (button) and either reset or pause the timer based on which TONOFF cycle it's currently on.
IO_EM_DI_05 is pressed
IF TONOFF_1.Q = TRUE THEN Pause the timer and reinitiate when IO_EM_DI_05 is pressed again
ELSE
IF TONOFF_1.Q = FALSE THEN Reset the timer
I've looked at switching to RTO and using multiple ladder rungs, but I'm getting stuck on the ladder layout.
Any pointers would be appreciated. Cheers.
What I now need to do is be able the program to take in a new input (button) and either reset or pause the timer based on which TONOFF cycle it's currently on.
IO_EM_DI_05 is pressed
IF TONOFF_1.Q = TRUE THEN Pause the timer and reinitiate when IO_EM_DI_05 is pressed again
ELSE
IF TONOFF_1.Q = FALSE THEN Reset the timer
I've looked at switching to RTO and using multiple ladder rungs, but I'm getting stuck on the ladder layout.
Any pointers would be appreciated. Cheers.