![background image](http://html.mh-extra.com/html/omron/nt20s/nt20s_operation-manual_744540245.webp)
226
EXAMPLE PROGRAM
Section 6-7
2360 *ESC.H ’
Notify touch switch (number)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2370 IF R.CODE$<>”H” THEN GOTO *ESC.J
2380 PRINT ”Pressed touch switch number : ”;VAL(”&H”+MID$(RCV$,3,3))
2390 PRINT:GOTO *RCV.END
2400 *ESC.J ’
Notify touch switch (bit)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2410 IF R.CODE$<>”J” THEN GOTO *ESC.S
2420 PRINT ”Pressed touch switch number : ”;
2430 TS=0
2440 FOR I=0 TO 13
2450 S=VAL(”&H”+MID$(RCV$,3+I*2,2))
2460 FOR J=0 TO 7
2470 IF (S MOD 2)=1 THEN PRINT TS;” ”;
2480 S=S¥2:TS=TS+1
2490 NEXT J,I
2500 PRINT:PRINT:GOTO *RCV.END
2510 *ESC.S ’
Notify lamp and touch switch status
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2520 IF R.CODE$<>”S” THEN GOTO *RCV.ERR
2530 PRINT ”Lamp/touch switch number : ”;VAL(”&H”+MID$(RCV$,4,2))
2540 M=VAL(MID$(RCV$,3,1))
2550 IF M=0 THEN M$=”OFF” ELSE IF M=1 THEN M$=”ON” ELSE M$=”INVERSE”
2560 PRINT ”Display status
: ”;M$
2570 PRINT:GOTO *RCV.END
2580 ’
2590 *RCV.ERR
2600 PRINT ”Receive data error”
2610 PRINT
2620 ’
2630 *RCV.END
2640 RY=CSRLIN
2650 LOCATE SX,SY
2660 *NORCV
2670 RETURN
2680 ’
2690 *ESC.0 ’
Display specified screen
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2700 LOCATE 43,0:INPUT ”Screen number : ”,M
2710 M$=RIGHT$(”000”+HEX$(M),4)
2720 SEND$=SEND$+M$
2730 RETURN
2740 *ESC.X ’
Screen # enquiry
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2750 RETURN
2760 *ESC.B ’
Write character screen
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2770 LOCATE 43,0:INPUT ”Character-screen memory table number : ”,M
2780 LOCATE 43,1:PRINT ”Write character string (MAX 32 CHARACTERS) ––>”
2790 LOCATE 43,2:INPUT C$
2800 M$=RIGHT$(”0”+HEX$(M),2)
2810 C$=LEFT$(C$,32):L$=RIGHT$(”0”+HEX$(LEN(C$)),2)
Содержание 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 ...