# Thread: Delta GCL+ Cycle Timer

1. Regular Guest
Join Date
Jan 2012
Location
Denver
Posts
35
Post Likes

## Delta GCL+ Cycle Timer

Good afternoon,
I am working on trying to program a cycle timer with ORCA... Trying to cycle pumps continuosly every 10 minutes during cold weather... 10 mins on and 10 mins off...
I am not the Delta genius... I think I am close and can play around some more tomorrow... but wondering if any Delta pros can weigh in on this...

For instance...
IF OAT<45 THEN
(PUMP = ON) AND (LOWTEMP = ON)
END IF
IF (PUMP = ON) ONFOR 10M
(PUMP = OFF)
END IF
IF (LOWTEMP = ON) AND ((PUMP = OFF) OFFOR 10M) THEN
(PUMP = ON)
END IF
IF (LOWTEMP = OFF)
PUMP = OFF

2. Professional Member
Join Date
Dec 2014
Location
Vancouver, BC
Posts
52
Post Likes
The tricky thing with the OnFor and OffFor is that they should really be called "True For" and "False For"
So if you write the following:
If (BV1 = Off) OffFor 5M then
BV2 = On
EndIf
That is a double negative, it will execute when BV1 has been ON for 5 minutes.

Also, when commanding multiple things within one If statement, just write to them on the next line. Using the AND operator asks a question it doesn't write to the point.

Here's what you are looking to do:

//ENABLE/DISABLE LOW TEMPERATURE MODE
If OAT < 45 Then
LOWTEMP = On
End If
If OAT > 50 Then
LOWTEMP = Off
End If

//CYCLE PUMP ON 10 MIN INTERVALS WHEN LOW TEMP MODE IS ACTIVE
If (LOWTEMP = On) And (PUMP OffFor 10M) Then
PUMP = On
End If
If PUMP OnFor 10M Then
PUMP = Off
End If

3. Regular Guest
Join Date
Jan 2012
Location
Denver
Posts
35
Post Likes
zzip7... Thanks for the reply. That worked perfect... Experience makes it look simple... I was way too complicated... Thanks again...

4. Professional Member
Join Date
Apr 2009
Location
chicago
Posts
102
Post Likes
LOWTEMP =SWITCH(OAT,45,50)
IF LOWTEMP THEN
DO EVERY 10M
IF PUMP ON THEN PUMP OFF ELSE PUMP ON ENDIF
ENDDO
ENDIF
IF OAT > 50 THEN STOP PUMP ENDIF

7 lines, condensed, and almost readable,

5. Professional Member
Join Date
Apr 2009
Location
chicago
Posts
102
Post Likes
DO EVERY 10M PUMP = NOT(PUMP)*(OAT<45) ENDDO

1 line, heh ,don't need differential,
Last edited by WHO_IS_I_AM; 10-28-2018 at 09:58 PM.

6. Professional Member
Join Date
Dec 2014
Location
Vancouver, BC
Posts
52
Post Likes
Originally Posted by WHO_IS_I_AM
DO EVERY 10M PUMP = NOT(PUMP)*(OAT<45) ENDDO

1 line, heh ,don't need differential,
Nice... Although, I'm a big believer in longer code if it means it's easier for the service guy or the customer to read and understand it. The controllers have some much memory now that it's rarely that big of issue.

7. Professional Member
Join Date
Apr 2009
Location
chicago
Posts
102
Post Likes
Originally Posted by zzip7
Nice... Although, I'm a big believer in longer code if it means it's easier for the service guy or the customer to read and understand it. The controllers have some much memory now that it's rarely that big of issue.
yea well its script, so if you want to write a book above the line of code, you can be as verbose as you wish, but longer the code usually the harder it is to understand, and more likely to err,