![background image](http://html.mh-extra.com/html/omron/nt20s/nt20s_operation-manual_744540247.webp)
228
EXAMPLE PROGRAM
Section 6-7
3280 IF N=99 THEN GOTO *ESC.K.3
3290 IF N<0 OR N>31 THEN GOTO *ESC.K.2
3300 TS.B(N)=TS.B(N)*(–1)
3310 COLOR 2+TS.B(N)*2
3320 LOCATE 65–(N MOD 8)*3,N¥8:PRINT RIGHT$(STR$(N),2)
3330 GOTO *ESC.K.2
3340 *ESC.K.3
3350 FOR I=0 TO 3
3360 M=0
3370 FOR J=0 TO 7
3380 IF TS.B(I*8+J)=1 THEN M=M+2^J
3390 NEXT J
3400 SEND$=SEND$+RIGHT$(”0”+HEX$(M),2)
3410 NEXT I
3420 COLOR 0
3430 RETURN
3440 *ESC.Q ’
Display lamps and touch switches (number)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3450 LOCATE 43,0:PRINT ”Display specification”
3460 LOCATE 43,1:PRINT ” 0 : OFF”
3470 LOCATE 43,2:PRINT ” 1 : ON”
3480 LOCATE 43,3:PRINT ” 2 : Inverse flashing (lamps only)”
3490 LOCATE 43,4:PRINT ” 3 : All ON”
3500 *QAGAIN
3510 LOCATE 43,5:INPUT ” : ”,M$
3520 IF M$<>”0” AND M$<>”1” AND M$<>”2” AND M$<>”3” THEN GOTO *QAGAIN
3530 LOCATE 43,6:INPUT ”Lamp/touch switch number : ”,N
3540 N$=RIGHT$(”00”+HEX$(N),2)
3550 SEND$=SEND$+M$+N$
3560 RETURN
3570 *ESC.R ’
Enquire lamp and touch switch status
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3580 LOCATE 43,0:INPUT ”Lamp/touch switch number : ”,N
3590 N$=RIGHT$(”00”+HEX$(N),2)
3600 SEND$=SEND$+N$
3610 RETURN
3620 *ESC.U ’
Disable inputs
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3630 SEND$=SEND$+”0”
3640 RETURN
3650 *ESC.V ’
Enables inputs
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3660 SEND$=SEND$+”0”
3670 RETURN
3680 *ESC.P ’
Display screen
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3690 LOCATE 43,0:PRINT ”Controlled item”
3700 LOCATE 43,1:PRINT ” 0 : Display”
3710 LOCATE 43,2:PRINT ” 1 : No display
3720 *PAGAIN
3730 LOCATE 43,3:INPUT ” : ”,M$
Содержание 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 ...