10
DEVICE EXPLANATION
10.14 Convenient Usage of Devices
10.14.2 Local devices
10
- 122
9
P
a
ra
met
e
rs
10
Device
Exp
la
n
at
ion
11
CP
U
M
odu
le
P
ro
cessi
ng
Ti
m
e
12
P
roc
e
d
ure
f
or W
rit
in
g
P
rog
ra
m t
o CP
U Mo
du
le
A
p
pe
nd
ic
e
s
In
de
x
(5) 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.
(a) Operation at "SM776 : OFF"
(b) Operation at "SM776 : ON"
Table10.30 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.
Figure 10.106 When SM776 is OFF
Figure 10.107 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)