Mitsubishi QD51 Programming Manual page 90

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

3 LET'S CREATE AND EXECUTE A PROGRAM
70 PRINT "Program B executed!!"
80 A=4:GOSUB 1000
90 END
SAVE " PRO-B"
OK
NEW
OK
10 PRINT "Program A executed!!"
20 A=7:B=3:GOSUB 1000
30 CHAIN MERGE " 0:PRO-B" , 70, ALL, DELETE 10-30
1000 PRINT " A=" ;A
1010 PRINT " B=" ;B
1020 RETURN
SAVE " PRO-A"
OK
3 - 49
(3) When a portion of the program is shared
The MERGE and DELETE options of the CHAIN instruction are used when a
certain portion of the current program is to be switched with another program.
Lines 90 through 30 of the
current program will be
deleted and the "PRO-B.BAS"
program will be added.
I'll erase this part since
I don't need it.
DELETE
option
10
20
30
60
RU N
Program A executed!!
A= 7
B= 3
Program B executed!!
A= 4
B= 3
OK
LIST
70 PRINT "Program B executed!!"
80 A=4:GOSUB 1000
90 END
1000 PRINT " A=" ;A
1010 PRINT " B=" ;B
1020 RETURN
OK
10
20
30
60
The transfer of variable contents using the ALL option and COMMON
instruction can be used even when the DELETE and MERGE options
are used in the CHAIN instruction.
MELSEC-Q
Contents of "PRO-B.BAS"
The original program
contents
A
I'll add this.
MERGE
option
3 - 49

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents