Created
August 7, 2012 02:20
-
-
Save brooksware2000/3280763 to your computer and use it in GitHub Desktop.
Routine to quickly ramp temperature up to the setpoint value
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'------------------------------------------------------------------------------- | |
' Ramps up to setpoint | |
'------------------------------------------------------------------------------- | |
RAMP_UP: | |
GOSUB StartTimer | |
WHILE (curTemp < setpoint) | |
IF (SecondsChanged = 1) THEN | |
GOSUB READ_TEMPERATURE | |
GOSUB COMPUTE_PID | |
TimeOn = (cycleTime * OutVal)/100 | |
Tvar = Tvar + 1 | |
IF (Tvar >= outMax) THEN Tvar = outMin | |
IF (Tvar < TimeOn) THEN | |
PORTPIN = 1 : PINSTATE = 1 : GOSUB SET_PIN | |
ELSE | |
PORTPIN = 1 : PINSTATE = 0 : GOSUB SET_PIN | |
ENDIF | |
GOSUB DISPLAY_STATUS | |
SecondsChanged = 0 | |
ENDIF | |
WEND | |
RETURN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment