3 - 36 3 - 36
MELSEC-Q
3 SPECIFICATIONS
(3) Writing/ Reading of Expansion Relay ON/OFF Data
ON/OFF data are written to or read from the expansion relay by the following
methods.
• Using the special variable B@ of the BASIC program
• Using the FROM/TO command in the sequence program
The expansion relay designation method differs as follows in the special variable
B@ and the FROM/TO command.
(a) Writing ON/OFF data and reading them using special variable B@ in a
BASIC program
With special variable B@, the expansion relay is designated by EM0 to
EM1023. Designation is in 1-bit units.
(Reading of data)
QD51(-R24)
(Writing of data)
EM0
EM1
EM2
EM3
EM4
EM1021
EM1022
EM1023
1/0
1/0
1/0
1/0
1/0
1/0
1/0
1/0
Expansion Relay
BASIC
program
B@
B@
Program example
The following shows a program where "1" is written into the QD51 (-
R24)'s expansion relay EM0.
150 B@ (EM, 0)=1
EM0 to EM15
EM16 to EM31
EM1008 to EM1023
EM992 to EM1007
2380
H
2381
H
23BF
H
23BE
H
EM
1
EM
14
EM
15
EM
0
EM
16
EM
17
EM
30
EM
31
EM
992
EM
993
EM
1006
EM
1007
EM
1008
EM
1009
EM
1022
EM
1023
b15
Expansion Relay
Special variable B@
(Writing of data)
BASIC
Program
(1-bit units)
QD51(-R24)
to
to
to
to
to
to
b0
to
Summary of Contents for QD51
Page 1: ......
Page 2: ......
Page 154: ...App 7 App 7 MELSEC Q APPENDIX MEMO ...
Page 159: ......
Page 160: ......