Mitsubishi Melsec A User Manual page 88

Table of Contents

Advertisement

7. COMMUNICATION WITH PROGRAMMABLE CONTROLLER CPU
/MELSEC
(2)
BASIC program example
[Program example]
Program for remote RUNISTOP of PC CPU through key inputs
100 LOCATE 20, 10.
. . . . . . . . . . . . . . . . .
.Specifies cursor position.
. . . . . . . . .
110 PRINT"ST0P PC CPU? YIN"
.Displays message.
120 A=INKEY
. . . . . . . . . . . . . . . . . . . . . .
.Waits for key input.
130 IF A W Y " GOT0 120
. . . . . . . . . . . . . .
.Checks key input characters.
. . . . . . . . .
140 Z=CALL(O, $8036, $FF, 60).
.Executes remote STOP.
145 IF Z#0 PRINT "ERROR", Z; GOT0 140. .Checks for errors
in
SKP exe-
cution.
150 LOCATE 20, 10
. . . . . . . . . . . . . . . . . .
.Specifies cursor position.
. .
160 PRINV'REMOTE-RUN PC CPU? Y/N"
.Displays message.
170 A=INKEY
. . . . . . . . . . . . . . . . . . . . . .
.Waits for key input.
180 IF A#$"Y" GOT0 170
. . . . . . . . . . . . .
.Checks key input characters.
. . . . . . . . .
190 Z=CALL(O. $8033, $FF, 60).
.Executes remote RUN.
200 IF Z#0 PRINT"ERROR", Z; GOT0 190.
.
.Checks for errors in SKR exe-
cution.
210 GOT0 100
7-31
IS I N N 660584

Advertisement

Table of Contents
loading

Table of Contents