Hei, im trying to program 2 fans to cool my room.
The 2 fans are controlled by 2 relays.
i have a push button to, to turn off the fans. The push button is momentary, or RESET button for a old computer
The fans turn on when the value is higher then 24c and turn off at 23,5.
But if i turn off the fans at 25Degc, it will automatic turn it self on again... Goes back to START.
START
TSTGT T3 240
CALLSUB VIF1_ON
TSTLE T3 235
CALLSUB VIF1_OFF
TSTEQ IP8 1
CALLSUB BUTT_NF
END
VIF1_ON:
SET OP4 1
SET OP5 1
RET
VIF1_OFF:
SET OP4 0
SET OP5 0
RET
BUTT_NF:
TSTEQ OP4 1
GOTO BUTT_OFF
TSTEQ OP4 0
GOTO BUTT_ON
RET
BUTT_ON:
TSTGT T3 240
AND IP8 1
SET OP4 1
SET OP5 1
NOP
BUTT_OFF:
SET OP4 0
SET OP5 0
DELAY 2000
Must i make a loop? to hold it 0 until i push it again.?
Thanks for advice.
The 2 fans are controlled by 2 relays.
i have a push button to, to turn off the fans. The push button is momentary, or RESET button for a old computer
The fans turn on when the value is higher then 24c and turn off at 23,5.
But if i turn off the fans at 25Degc, it will automatic turn it self on again... Goes back to START.
START
TSTGT T3 240
CALLSUB VIF1_ON
TSTLE T3 235
CALLSUB VIF1_OFF
TSTEQ IP8 1
CALLSUB BUTT_NF
END
VIF1_ON:
SET OP4 1
SET OP5 1
RET
VIF1_OFF:
SET OP4 0
SET OP5 0
RET
BUTT_NF:
TSTEQ OP4 1
GOTO BUTT_OFF
TSTEQ OP4 0
GOTO BUTT_ON
RET
BUTT_ON:
TSTGT T3 240
AND IP8 1
SET OP4 1
SET OP5 1
NOP
BUTT_OFF:
SET OP4 0
SET OP5 0
DELAY 2000
Must i make a loop? to hold it 0 until i push it again.?
Thanks for advice.