Mitsubishi Electric MELSEC FX3U Programming Manual page 343

Melsec fx series programmable logic controllers
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
Caution
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.
Program example
When X000 is ON, the number of bits in the ON status in D0 is counted, and stored to D2.
X000
FNC 43
SUM
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
S
D
The number of "1" in D0 is stored to D2.
D 0
D 2
D 0 = K0
D 0 = K21847
12 Data Operation – FNC 40 to FNC 49
12.4 FNC 43 – SUM / Sum of Active Bits
D 2 = K0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
M8020=ON
Zero flag
D 2 = K9
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1
M8020=OFF
Zero flag
32 16 8 4 2 1
341
11
12
13
14
15
16
17
18
19
20

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents