131
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
5 How to Specify Devices and Constants to Instructions
5.4 Specification of Digits for Bit Devices (Kn[ ]***)
1
In
troduct
io
n
2
Ov
e
rv
ie
w
3
In
st
ru
ct
ion
Li
st
4
D
evi
ce
s
in
De
ta
il
5
Speci
fied t
h
e
D
evi
ce &
C
onst
a
nt
6
Bef
o
re
Pr
ogr
a
m
m
ing
7
Bas
ic
In
st
ru
cti
o
n
8
FNC0
0
-FNC0
9
P
ro
g
ra
m F
lo
w
9
FNC1
0
-FNC1
9
M
ov
e
&
C
om
par
e
10
FNC
20-
FNC
2
9
Ar
ith.
&
Logi
c
O
per
at
io
n
5.4
Specification of Digits for Bit Devices (Kn[ ]***)
Handling of bit devices
Devices which handle only the ON/OFF information such as X, Y, M and S are called bit devices.
On the other hand, devices handling numeric values such as T, C, D and R are called word devices.
Even bit devices can handle a numeric value when they are combined. In this case, the number of digits Kn
and the head device number are combined.
The number of digits is expressed in units of 4 bits; K1 to K4 are used for 16-bit data, and K1 to K8 are used
for 32-bit data.
For example, "K2M0" indicates two-digit data expressed by M0 to M7.
When 16-bit data is transferred to K1M0 to K3M0, it is not transferred to high-order bits whose data length is
insufficient.
32-bit data is transferred in the same way.
When the number of digits specified for bit devices is K1 to K3 (or K1 to K7) in a 16-bit (or 32-bit) operation,
the insufficient high-order bits are always regarded as "0". It means that such data is always positive.
Two-digit BCD data expressed by X004 to X013 is converted into
binary data, and then transferred to D0.
A bit device number can be specified arbitrarily, but it is recommended to set the least significant digit to "0"
for X or Y. (In other words, it is recommended to specify "X000, X010, X020 ... Y000, Y010, Y020 ...")
For M and S, multiples of "8" are ideal, but it is recommended to specify "M0, M10, M20 ..." to prevent
confusion.
Specification of serial words
A series of data registers starting from D1 means "D1, D2, D3, D4 ....."
In the case of word devices with digit specification, when such word devices are handled as a series, they are
specified as shown below:
• K1X000,
K1X004,
K1X010,
K1X014 .....
• K2Y010,
K2Y020,
K2X030 .....
• K3M0,
K3M12,
M3M24,
K3M36 .....
• K4S16,
K4S32,
K4S48 .....
Use the above devices in units of digit so that devices are not skipped.
When "K4Y000" is used in a 32-bit operation, high-order 16 bits are regarded as "0".
It is necessary to use "K8Y000" when 32-bit data is required.
Sign bit (0 = Positive, 1: Negative)
Transferred
Low order
M15
M8
M7
M0
Do not change
D 0
D 1
K2M0 0
Transferred
Sign bit (0 = Positive, 1: Negative)
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
0
0
0
0
0
0
0
0
1
0
1
0
1
0
1
M6
M5
M12 M11 M10
M9
M4
M3
M2
M1
M14 M13
Low order
M 0
FNC 19
BIN
K 2X004
D 0
Содержание FX3U Series
Страница 1: ...PROGRAMMING MANUAL Basic Applied Instructions Edition FX3U FX3UC SERIES PROGRAMMABLE CONTROLLERS ...
Страница 2: ......
Страница 889: ......