Mitsubishi QD51 Programming Manual page 89

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

Advertisement

3 LET'S CREATE AND EXECUTE A PROGRAM
3 - 48
(2) When the contents have to be transferred
The CHAIN instruction is used when the variable used in the program currently
being executed must be transferred to the next program. When all of the used
variables are to be transferred, the ALL option of the CHAIN instruction is used.
The COMMON instruction is used when certain variable contents are to be
transferred.
10 PRINT "Program B executed!!"
20 PRINT " A=" ;A
30 END
SAVE " PRO-B"
OK
NEW
OK
10 PRINT "Program A executed!!"
20 A=100
30 PRINT " A=" ;A
40 CHAIN " 0:PRO-B" , 10, ALL
SAVE " PRO-A"
OK
Take them all, OK?
When the ALL option is specified
in the CHAIN instruction
Just take the variables
specified in COMMON.
When the COMMON instruction is used.
Variables not specified in COMMON.
RU N
Program A executed!!
A=100
Program B executed!!
............
A=100
The contents of the
OK
variable have been
transferred.
......
This is an example of all variables being
transferred.
COMMON
A, B$, C% (1)
MELSEC-Q
All variables
being used.
Variables
specified
in COMMON.
3 - 48

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents