Mitsubishi Electric MELSEC iQ-R Series User Manual page 493

Process cpu module
Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

When local device is used in subroutine program
Local devices to be used vary depending on whether SM776 (Local device setting at CALL) is turned on or off. Local index
register to be used is also determined according to the SM776 setting.
SM776
Local device to be used
Off
Uses local devices of the program file from which subroutine program is called.
On
Uses local devices of the program file into which the subroutine program is stored.
• In terms of on/off setting for SM776, the value (on or off) used when the subroutine call occurs is considered
to be effective. Therefore when on/off setting for SM776 is switched in the subroutine program, the modified
value (on or off) is not effective until the next subroutine call occurs.
• On/off setting for SM776 cannot be specified for each program file because it is enabled for each CPU
module.
When local device is used in interrupt and other programs
When using a local device for an interrupt program / a fixed scan execution type program / an event execution type program
triggered by occurrence of an interrupt, turn on SM777 (Local device setting in interrupt programs). The programs will not
function properly if SM777 is turned off.
Ex.
Operation if SM777 is turned on in following setting
Program name
A
B
C
X
A
Execution program
For B
Local device
(1) Uses the program X local device.
For local index register, the register of the program file which has been executed before these programs is used regardless of
the SM777 setting.
• For SM777, the value (on/off) set at the execution of an interrupt program / a fixed scan execution type
program / an event execution type program triggered by occurrence of an interrupt is valid. For this reason,
when the set value is changed while a program is being executed, the value changed does not become
valid until the next time any of these programs is executed.
• On/off setting for SM777 cannot be specified for each program file because it is enabled for each CPU
module.
• When the local device monitor is executed, the monitor switches to the applicable local device.
Consequently, if SM777 is off, when an interrupt occurs immediately after switching, and a local device is
accessed, the local device being monitored by the local device monitor is used. (The local device for the
program being run prior to the interrupt (program immediately before END) is not accessed.)
Execution type
Scan
Scan
Scan
Fixed scan
C
B
X
For B
For C
For X
(1)
Local device use/not use
Not Use
Use
Use
Use
A
END
B
X
For B
For C
For X
(1)
C
END
X
For C
For X
(1)
27 DEVICES
491
27.19 Local Device
27

Advertisement

Table of Contents
loading

Table of Contents