Brookfield Temperature Controller, Model 106 User Manual
Page 25
Brookfield Engineering Labs., Inc.
Page 25
Manual No. M/02-207-C009
1550 WEND
‘ End WHILE from line 1245
1560 HTCMD$ = “RA2”
‘ Set Controller to Stby mode
1570 GOSUB 1890
‘ Send command to HT-104
1580 PRINT
1590 PRINT SPC(25);
“Temperature ramp complete!”
1600 PRINT SPC(25);
“Returning the Controller to its Standby state.”
1610 GOSUB 2240
‘ Close Communications channel
1620 END
1630 ‘
1640 ‘
1650 ‘ Routine that waits for a keystroke
1660 ‘
1670 KEYSTROKE$ = “”
1680 WHILE KEYSTROKE$ = “”
1690 KEYSTROKE$ = INKEY$
1700 WEND
1710 RETURN
1730 ‘
1740 ‘ Initialize variables and constants
1750 ‘
1760 CR$ = CHR$(13)
1770 TEMPERATURE = 0
1780 SETPOINT = 100
1790 TMPTUNITS$ = “C”
1800 CURSY = 3
1810 POINTNUM = 1
1820 INRUN = 0
1830 RESP$ = “”
1840 RETURN
1860 ‘
1870 ‘ Routine to send commands to the Programmable Temperature Controller
1880 ‘
1890 GOSUB 2160
1900 HTCMD$ = HTCMD$ + CR$
1910 PRINT #1, HTCMD$
1920 RETURN
1930 ‘
1940 ‘
1950 ‘ Routine to receive a response from the Programmable Temp Controller
1960 ‘
1970 RESP$ = “”
1980 WHILE RIGHT$(RESP$, 1) <> CR$ ‘ Wait for a carriage return
1990 IF LOC(1) > 0 THEN RESP$ = RESP$ + INPUT$(LOC(1), #1)
2000 WEND
2010 ‘ DO
2020 ‘ LOOP UNTIL INKEY$ <> “”
2030 RETURN
2040 ‘
2050 ‘
2060 ‘ Routine to parse response to a response
2070 ‘
2080 ‘ Extract temperature and status info from the response
2090 IF (LEFT$(HTCMD$, 1) = “T”) OR (LEFT$(HTCMD$, 2) = “RS”) THEN TMPTRESP$ =
MID $(RESP$, 2, 4): TMPTUNITS$ = MID$(RESP$, 6, 1)
2100 IF LEFT$(HTCMD$, 1) = “T” THEN TEMPERATURE = VAL(TMPTRESP$) / 10
2110 RETURN