![background image](http://html.mh-extra.com/html/omron/nt20s/nt20s_operation-manual_744540246.webp)
227
EXAMPLE PROGRAM
Section 6-7
2820 SEND$=SEND$+L$+M$+C$
2830 RETURN
2840 *ESC.C ’
Write 4-digit number
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2850 LOCATE 43,0:INPUT ”Numeral table #
: ”,M
2860 *NAGAIN
2870 LOCATE 43,1:INPUT ”Write 1 to 4-digit number : ”,N%
2880 IF N%<–999 OR N%>9999 THEN GOTO *NAGAIN
2890 IF N%<0 THEN S$=”F” ELSE S$=””
2900 M$=RIGHT$(”00”+HEX$(M),3)
2910 N%=ABS(N%)
2920 N$=STR$(N%):N$=RIGHT$(N$,LEN(N$)–1)
2930 IF S$<>”F” THEN N$=RIGHT$(”000”+N$=RIGHT$(”00”+N$,3)
2940 SEND$=SEND$+M$+S$+N$
2950 RETURN
2960 *ESC.D ’
Write 8-digit number
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2970 LOCATE 43,0:INPUT ”Numeral table #
: ”,M
2980 *N8AGAIN
2990 LOCATE 43,1:PRINT SPACE$(36)
3000 LOCATE 43,1:INPUT ”Write 1 to 8-digit number : ”,N#
3010 N#=INT(N#)
3020 IF N#<–9999999# OR N#>99999999# THEN GOTO *N8AGAIN
3030 IF N#<0 THEN S$=”F” ELSE S$=””
3040 M$=RIGHT$(”00”+HEX$(M),3)
3050 N#=ABS(N#)
3060 N$=STR$(N#):N$=RIGHT$(N$,LEN(N$)–1)
3070 IF S$<>”F” THEN N$=RIGHT$(”0N$,8) ELSE N$=RIGHT$(”N$,7)
3080 SEND$=SEND$+M$+S$+N$
3090 RETURN
3100 *ESC.2F ’
Copy memory table
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3110 LOCATE 43,0:INPUT ”0: character string/1 : number ”,M$
3120 IF M$<>”0”AND M$<>”1” THEN *ESC.2F
3130 LOCATE 43,1:INPUT ”Copy source memory table number : ”,S%
3140 LOCATE 43,2:INPUT ”Copy destination memory table number : ”,D%
3150 S$=STR$(S%):S$=RIGHT$(S$,LEN(S$)–1):S$=RIGHT$(”00”+S$,3)
3160 D$=STR$(D%):D$=RIGHT$(D$,LEN(D$)–1):D$=RIGHT$(”00”+D$,3)
3170 SEND$=SEND$+M$+S$+D$
3180 RETURN
3190 *ESC.K ’
Display lamps and touch switches (bits)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3200 FOR I=0 TO 31:TS.B(I)=–1:NEXT I
3210 FOR I=0 TO 31
3220 LOCATE 65–(I MOD 8)*3,I¥8:PRINT RIGHT$(STR$(I),2)
3230 NEXT I
3240 LOCATE 43,5:PRINT ”Input # : Inverse Input : Run input 99 : Execute”
3250 *ESC.K.2
3260 COLOR 0:LOCATE 43,6:PRINT SPACE$(36)
3270 LOCATE 43,6:INPUT ”Lamp/touch switch number : ”;N
Содержание 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 ...