Special Variables (How To Use B@ And W@) - Mitsubishi QD51 Programming Manual

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

2 THE BASICS OF AD51H-BASIC

2.8.3 Special variables (How to use B@ and W@)

2 - 14
• These variables are used to read/write from/to each device of the communication
module from within BASIC programs.
• There are the following 4 types of special variables.
B@ (EM, expression)
W@ (ED, expression)
B@ (X, expression)
W@ (Y, expression)
Refer to the user's manual for each communication module for details on the extension
relays EM, extension registers ED, general-purpose inputs X, and general-purpose
outputs Y.
Note that it is possible to read and write to/from the special EM and special ED
extension devices.
(1) Reading from and writing to bit devices
B@(EM, expression)
B@(X, expression)
B@(Y, expression)
• Specify a device number in the expression.
When general-purpose inputs X or outputs Y are specified, values between 0
and1F
are used regardless of the input/output numbers of the entire system.
H
A
X
The input/output
41
numbers as seen
(32 points)
0 to 1F
from the PLC CPU
Value specified
in the expression
• • • • •
Read/write from/to the extension relays EM.
• • • • •
Read/write from/to the registers ED.
• • • • •
Write to general-purpose inputs X.
• • • • •
Read from general-purpose outputs Y.
• • • • •
Specify a value between 0 and 1023 for
the expression.
Specify a value between 0 and 1F
expression. Since this must be specified in
• • • • •
hexadecimal, place '&H' in front of the
numeric value.
A
AD
A
A
X
51
X
Y
41
H
41
41
(32 points)
(48 points)
(32 points)
(32 points)
20 to 3F
40 to 6F
70 to 8F
90 to AF B0 to CF
40
to 4F
50 to 6F
?
General-purpose
inputs/outputs
?
X, Y
0 to 1F
MELSEC-Q
A
A
Y
Y
41
41
(32 points)
(32 points)
D0 to EF
for the
H
2 - 14

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents