EasyManua.ls Logo

Mitsubishi Electric MELSEC iQ-R Series - Page 493

Mitsubishi Electric MELSEC iQ-R Series
760 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
27 DEVICES
27.19 Local Device
491
27
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.
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
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.)
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.
Program name Execution type Local device use/not use
AScanNot Use
BScanUse
CScanUse
X Fixed scan Use
(1) Uses the program X local device.
A
END
C
A
BB
C
END
X
XX
(1) (1) (1)
Execution program
Local device
For X
For B
For C
For X
For C
For X
For B For B
For C

Table of Contents

Other manuals for Mitsubishi Electric MELSEC iQ-R Series

Related product manuals