118
────────────────────────────────────────────────────
8.9 Sample Programs
────────────────────────────────────────────────────
NOTE
(3) Setting and executing the comparator
Summary ・ This program sets, executes, and eliminates the comparator table.
・ This program sets the buzzer mode, the external control mode, the comparison
method, and the comparison range of the comparator.
When the value impossible to set is input, an error is generated, and the
setting keeps as it is.
Program List
100 OUTPUT 701;":FUNC RESI"
110 LINPUT "Table Number? (1‑15) ",T$
120 OUTPUT 701;":CSET:TABL "&T$
130 LINPUT "Delete? (Y/N) ",D$
140 IF D$<>"Y" AND D$<>"N" THEN 130
150 IF D$="Y" THEN
160 OUTPUT 701;":CSET:USE OFF"
170 ELSE
180 LINPUT "Buzzer Mode? (O/H/I) ",B$
190 IF B$<>"O" AND B$<>"H" AND B$<>"I" THEN 180
200 IF B$="O" THEN
210 OUTPUT 701;":CSET:BEEP OFF"
220 ELSE
230 IF B$="H" THEN
240 OUTPUT 701;":CSET:BEEP HL"
250 ELSE
260 OUTPUT 701;":CSET:BEEP IN"
270 END IF
280 END IF
290 LINPUT "External Mode? (A/E) ",E$
300 IF E$<>"A" AND E$<>"E" THEN 290
310 IF E$="A" THEN
320 OUTPUT 701;":CSET:TMOD AUTO"
330 ELSE
340 OUTPUT 701;":CSET:TMOD EXT"
350 END IF
360 LINPUT "Comparator Mode? (H/R) ",M$
370 IF M$<>"H" AND M$<>"R" THEN 360
380 IF M$<>"H" THEN
390 OUTPUT 701;":CSET:CMOD HL"
400 ELSE
410 OUTPUT 701;":CSET:CMOD REF"
420 END IF
430 LINPUT " HIGH(REF)? ",H$
440 LINPUT " LOW(%)? ",L$
450 OUTPUT 701;":CSET:PARA "&H$&"."&L$
460 OUTPUT 701;":CSET:USE ON"
470 OUTPUT 701;":COMP "&T$
480 END IF
490 END