So I wanted to share this info for people. I had no idea there was a "WHEN" statement, and it is awesome!! Basically the statement will monitor how long something is "ON" and can turn it off (or the reverse).
I needed this recently because I got a new ATO Pump (PMUP V2) and it states not to run it dry. I've run it semi-dry a few times now after forgetting to fill the ATO reservoir. So I was thinking to myself there should be something like a max on time or something... and after a google search I found the "WHEN" Statement.
Official WHEN Statement Documentation
My ATO statement / Explanation
My ATO really only takes about 10 seconds or so to flip the switch with the 60 minute min time.
Maybe everyone already knew about this, but I didn't and wanted to share it.
I needed this recently because I got a new ATO Pump (PMUP V2) and it states not to run it dry. I've run it semi-dry a few times now after forgetting to fill the ATO reservoir. So I was thinking to myself there should be something like a max on time or something... and after a google search I found the "WHEN" Statement.
Official WHEN Statement Documentation
My ATO statement / Explanation
Code:
Fallback OFF <- So it stays OFF
Set OFF <-- Sets initial statement to OFF
If Sw1 CLOSED Then ON <-- Water level switch
If Sw2 CLOSED Then OFF <-- Water level switch
If Sw3 OPEN Then OFF <-- Water level switch
If pH > 8.40 Then OFF <-- My ATO also doses kalk, so this ensures it doesn't send too much there.
When On > 001:00 Then OFF <-- ATO can only run for 1 minute before it forces it to turn off.
Defer 005:00 Then ON <-- Waits five minute for a switch's to reach right before it turns on.
Min Time 060:00 Then OFF <-- Won't run again for 60 minutes after it runs.
My ATO really only takes about 10 seconds or so to flip the switch with the 60 minute min time.
Maybe everyone already knew about this, but I didn't and wanted to share it.