![background image](http://html.mh-extra.com/html/omron/nt20s/nt20s_operation-manual_744540242.webp)
223
EXAMPLE PROGRAM
Section 6-7
EXAMPLE PROGRAM
1000 ’ ********************************************************
1010 ’ * OPERATION COMMAND EXAMPLE PROGRAM (NT20S–ST128) *
1020 ’ ********************************************************
1030 ’
Draw screen frame
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1040 SECT=9
1050 DIM CMND$(SECT,10,1),CMND(SECT),TS.B(31)
1060 SCREEN 3:CLS 3:CONSOLE 15,10,0,0
1070 LINE (0,176)–(639,176),7,,&HF0F0
1080 LINE (159,0)–(159,176),7,,&HF0F0
1090 LINE (300,0)–(300,176),7,,&HF0F0
1100 LINE (0, 16)–(159, 16),7,,&HF0F0
1110 LINE (0, 96)–(159, 96),7,,&HF0F0
1120 LINE (0,112)–(159,112),7,,&HF0F0
1130 LINE (520,176)–(520,224),7,,&HF0F0
1140 LINE (0,223)–(639,224),7,B
1150 COLOR 0:LOCATE 2,0:PRINT ”OPERATING COMMANDS”
1160 COLOR 0:LOCATE 2,6:PRINT ”TERMINAL COMMANDS”
1170 CMND(0)=SECT ’
Set display character strings
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
1180 FOR I=1 TO SECT
1190 READ CMND$(0,I,0)
1200 NEXT I
1210 FOR I=1 TO SECT
1220 READ CMND(I)
1230 FOR J=1 TO CMND(I)
1240 READ CMND$(I,J,0),CMND$(I,J,1)
1250 IF CMND$(I,J,1) = ”@@@@@@” THEN CMND$(I,J,1) = ”[ESC]”+CHR$(&H22)
1260 NEXT J
1270 NEXT I
1280 ’
1290 RY=15
1300 ON COM(1) GOSUB *RECV ’
Set receive interrupt routine
. . . . . . . . . . . . . . . . . .
1310 OPEN ”COM1:E81NN” AS #1 ’
Open communication port
. . . . . . . . . . . . . . .
1320 ’ NT20S_SETTING OF ST128
1330 ’ DATA BIT LENGTH
8 BITS
1340 ’ STOP BIT LENGTH
1 BIT
1350 ’ PARITY
ODD
1360 ’ FLOW CONTROL
RS/CS
1370 ’ BAUD RATE
(VALUE SET BY SWITCH COMMAND)
1380 COM(1) ON
1390 ’
1400 *LV0 ’
Main Menu
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1410 LV=0:SECT.NO=0:SEL.NO=1
1420 GOSUB *SELECT
1430 IF SEL.NO=0 THEN GOTO *PRO.END
Содержание NT20S
Страница 1: ...Cat No V020 E1 04 NT20S Programmable Terminal OPERATION MANUAL ...
Страница 2: ...i ...
Страница 3: ...ii ...
Страница 4: ...iii NT series Programmable Terminal Operation Manual Revised August 1997 ...
Страница 5: ...iv ...
Страница 7: ...vi ...
Страница 11: ...x ...
Страница 19: ...xviii ...
Страница 129: ...110 ...
Страница 169: ...150 ...
Страница 253: ...234 ...