PDA

View Full Version : Closed loop programing help?


kewadiak
09/02/2014, 05:24 PM
Can someone write me a code that would turn my closed loop pump on at 00:00 off at 01:00 on at 12:00 off at 13:00 not sure how to turn it on off multiple times threw out the day thanks for the help

Mark Bianco
09/03/2014, 03:57 AM
You can adjust the times. The fallback statement an be either ON or OFF

(CL PUMP)
Fallback OFF
OSC 000:00/060:00/060:00 Then ON

kurt_n
09/03/2014, 08:40 AM
Mark's code will turn your pump on for 60 minutes, then off for 60 minutes, then on for 60 minutes, then off.... you get the idea. Bascially, it oscillates (OSC) every 60 minutes.

If you're looking for discrete times of on/off and not continuous, then you could also use the "If Time..." statement. For your example it would look like this:

Set OFF
If Time 0:00 to 01:00 Then ON
If Time 12:00 to 13:00 Then ON

The "Set OFF" keeps the pump off unless any of the "If Time..." statements are true. In Apex programming, the last true statement wins and sets the on/off state of the outlet. If you are outside of the 0:00-1:00 and 12:00-13:00 times, nothing is true and the SET command wins.