Mitsubishi Electric MELSEC-Q00U(J)CPU User Manual page 428

Table of Contents

Advertisement

(5) Using the local device corresponding to the file where a subroutine program is
stored
When a subroutine program is executed, the local device corresponding to the file where the subroutine program
is stored can be utilized.
Use of the relevant local device is set by ON/OFF of SM776.
SM776
OFF
Perform operations with the local device that corresponds to the source file of the subroutine program.
ON
Perform operations with the local device that corresponds to the file where the subroutine program is stored.
(a) When SM776 is off
X0
X2
(b) When SM776 is on
X0
X2
(c) Precautions
• When SM776 is on, local device data are read out when a subroutine program is called, and the data are
saved after execution of the RET instruction.
Because of this, the scan time is increased if one subroutine program is executed with SM776 set to on.
• The on/off status of SM776 is set for each CPU module.
It cannot be set for each file.
• If the on/off status of SM776 is changed during sequence program execution, control is implemented
according to the information after the change.
426
File name: ABC
Execution of subroutine
CALL
P100
program
INCP
D0
END
Local device area for
file name, ABC
File name: ABC
Execution of subroutine
CALL
P100
program
INCP
D0
END
Local device area for
file name, ABC
Operation
(Stand-by type program)
P100
Local device
Local device area for
writing/reading
File name: DEF
(Stand-by type program)
P100
Local device
writing/reading
Local device area for
File name: DEF
Subroutine
program
RET
file name, DEF
Subroutine
program
RET
file name, DEF

Advertisement

Table of Contents
loading

Table of Contents