Hi,Lou Apo said:This should swap the relays every 15 minutes. This is a very generic program in that you could very easily swap out the numbers in the 3 lines with ** to make the program work on different times and intervals. It also can't get messed up by changes to the clock or someone manually changing things. It will immediately correct itself. Again, I haven't tested, so no promises.
START
TSTGE CH 20 ** first 4 lines set the first and second bits to 1 if they are true
ORB RAM1 1 RAM1
TSTLT CH 6 **
ORB RAM1 2 RAM1
TSTNE RAM1 3 first and second bits both true is 3
CALLSUB RESET
TSTEQ RAM1 3
CALLSUB RELAY
SET RAM1 0
END
RELAY:
DIV CTS 900 RAM1 ** substitute for 900 how many seconds you want between relay swaps. 900 for 15 minutes
ANDB RAM1 1
BZ RELAY1
SET OP1 0
SET OP2 1
RET
RELAY1:
SET OP1 1
SET OP2 0
RET
RESET:
SET OP1 0
SET OP2 0
RET
I have just uploaded this program in the CAI controller and OP1 and OP2 stay 0.
I can’t even change them manually in the output control