9
- 105
9.13 Convenient Usage of Devices
9.13.1 Global devices and local devices
9
DEVICE EXPLANATION
(d) Using local devices used by the file where a subroutine program is stored
It is possible to use local devices that are used by the file where a subroutine
program is stored when executing a subroutine program.
Whether or not such local devices are used is set by special relay (SM776) ON/
OFF setting.
1) Operation at "SM776 : OFF"
2) Operation at "SM776 : ON"
Table9.23 Switching over local devices by setting ON/OFF for a special relay (SM776)
SM776 Operation
OFF
Executes calculation by the local devices that are used by the file where the
subroutine program was called.
ON
Executes calculation by the local devices that are used by the file where the
subroutine program is stored.
Diagram 9.99 When SM776 is OFF
Diagram 9.100 When SM776 is ON
X0
X2
P100
D0
CALL
INCP
END
RET
P100
Subroutine
program
Local devices used by
the file name: ABC
Local devices used
by the file name: DEF
File name: ABC
File name: DEF
(Stand-by type program)
Execution of the sub-
routine program
Read/write of the
local devices
X0
X2
P100
D0
CALL
INCP
END
RET
P100
Subroutine
program
Local devices used by
the file name: ABC
Local devices used by
the file name: DEF
Execution of the sub-
routine program
Read/write of the
local devices
File name: ABC
File name: DEF
(Stand-by type program)