Download Print this page

Mitsubishi Electric MELSEC FX Series Structured Programming Manual page 250

Hide thumbs Also See for MELSEC FX Series:

Advertisement

FXCPU Structured Programming Manual
(Basic & Applied Instruction)
3. Operation result of the device specified by
16-bit operation)
b15 b14 b13 b12 b11 b10
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Cautions
1) When handling 32-bit data in a structured program, a 16-bit device cannot be specified directly as in the
case of a simple project. Use a label to handle 32-bit data.
A 32-bit counter can be specified directly as it is a 32-bit long device.
Use a global label to specify a device.
2) While the command input is OFF, the instruction is not executed. The output of the number of bits in the
ON status is latched in the previous status.
3) Some restrictions to applicable devices
1:The FX
2:The FX
Program examples
When X000 is ON, the number of bits in the ON status in D0 is counted, and stored to D2.
[Structured ladder]
X000
D0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1
248
Bit device
b9
b8
b7
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
, FX
and FX
PLCs only are applicable.
3U
3UC
3G
and FX
PLCs only are applicable.
3U
3UC
SUM
EN
ENO
The number of "1" in D0 is stored to D2.
s
d
D2
D 0 = K0
D 0 = K21847
according to the value specified by
b6
b5
b4
b3
b2
b1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
1
1
0
0
0
0
1
1
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
1
0
1
0
0
0
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
[ ST ]
SUM_2(X000, D0, D2);
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
M8020=ON
Zero flag
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1
M8020=OFF
Zero flag
7 Applied Instructions
7.5 Data Operation
Word device
b0
Decimal Hexadecimal
0
0
0000
1
1
0001
0
2
0002
1
3
0003
0
4
0004
1
5
0005
0
6
0006
1
7
0007
0
8
0008
1
9
0009
0
10
000A
1
11
000B
1
-5
FFFB
0
-4
FFFC
1
-3
FFFD
0
-2
FFFE
1
-1
FFFF
D 2 = K0
D 2 = K9
32 16 8 4 2 1
(in
M8020
Zero flag
0
ON
1
OFF
1
OFF
2
OFF
1
OFF
2
OFF
2
OFF
3
OFF
1
OFF
2
OFF
2
OFF
3
OFF
OFF
15
OFF
14
OFF
15
OFF
15
OFF
16
OFF

Advertisement

loading

This manual is also suitable for:

Fxcpu