Mitsubishi Electric Q01UCPU User Manual page 426

Hide thumbs Also See for Q01UCPU:
Table of Contents

Advertisement

(5) Using the local device corresponding to the file where a subroutine program is
stored
When executing a subroutine program, you can utilize the local device corresponding to the file where the
subroutine program is stored.
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
(b) When SM776 is on
(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.
424
File name: ABC
X0
Execution of subroutine
CALL
P100
program
X2
INCP
D0
END
Local device area for
file name, ABC
File name: ABC
X0
Execution of subroutine
CALL
P100
program
X2
INCP
D0
END
Local device area for
file name, ABC
Operation
(Stand-by type program)
P100
Local device
writing/reading
Local device area for
(Stand-by type program)
P100
Local device
writing/reading
Local device area for
File name: DEF
Subroutine
program
RET
file name, DEF
File name: DEF
Subroutine
program
RET
file name, DEF

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents