Graphic Operation Terminal F940GOT
Introduction 1
1-28
•
Program example
This program writes "31,000" to D10, and "15,600" to D11. In hexadecimal, "31,000" is
expressed as "7918H" and "15,600" as "3CF0H".
10'
Sample program
20'
500
TO=3000
: '
Counter waiting for receive (to be adjusted in accor-
dance with speed of computer)
530
ERFLG=0
610
STX$=CHR$ (2)
620
STX$=CHR$ (13)
630
ACK$=CHR$ (6)
640
NAK$=CHR$ (&H15)
1000 * DATASEND
: '
Send of statement
1010
CLOSE#1
1020
OPEN" COM1:" AS#1
1030
SENDDATA$=" 100140479183CF0"
: '
Send statement
1040
PRINT#1, STX$;SENDDATA$;CR$;
1100 * REC0
: '
Receive of first character
1110
RVCNT=1
1120
GOSUB *JYUSHIN
1130
IF ERFLG=99 THEN GOTO *ERRORFIN1
1140
BUF$=RCV$
1150
HED$=LEFT$ (BUF$,1)
1160
IF HED$=ACK$ THEN GOTO *FIN
1170 * ERROFIN1
1180
"Error code is sent back."
1190
GOTO *FIN
1700 * ERRORFIN1
1710
"No response"
2000 * FIN
2010
CLOSE#1
2020
END
2100 * JYUSHIN
: '
Waiting for receive
2110
FORI=1 TO T0
2120
RCV$=""
2130
IF LOC (1)=>RVCNT THEN GOTO *BUFIN
2140
NEXT
2150
IF RCV$=" " THEN ERFLG=99
2160
RETURN
2200 * BUFIN
: '
Read of receive data
2210
RCV$=INPUT$ (RVCNT, #1)
2220
RETURN
D10
D11
Summary of Contents for F940GOT-LWD-E
Page 1: ...OPERATION MANUAL F940GOT SWD E F940GOT LWD E...
Page 4: ...Graphic Operation Terminal F940GOT 2...
Page 6: ...Graphic Operation Terminal F940GOT 4...
Page 8: ...Graphic Operation Terminal F940GOT 6...
Page 14: ...Graphic Operation Terminal F940GOT Contents vi...
Page 104: ...Graphic Operation Terminal F940GOT Alarm Mode 6 6 12...
Page 148: ...Graphic Operation Terminal F940GOT Creation of Display Screens 9 9 30...
Page 228: ...Graphic Operation Terminal F940GOT Changeover of Display Screen FX PCS DU WIN E 11 11 18...