Fnc 43 - Sum / Sum Of Active Bits - Mitsubishi FX3G Series Programming Manual

Programmable controllers
Hide thumbs Also See for FX3G Series:
Table of Contents

Advertisement

FX
/FX
/FX
/FX
3G
3U
3GC
3UC
Programming Manual - Basic & Applied Instruction Edition
12.4
FNC 43 – SUM / Sum of Active Bits
Outline
This instruction counts the number of "1" (ON) bits in the data of a specified device.
1. Instruction format
FNC 43
D
SUM
2. Set data
Operand type
S
S
1
D
3. Applicable devices
Bit Devices
Oper-
and
System User
Type
X Y M T C S D .b KnX KnY KnM KnS T
S
S
1
S
D
2
: This function is supported only in FX
Explanation of function and operation
1. 16-bit operation (SUM and SUMP)
The number of bits in the ON status in
• When all bits are OFF in
Command
input
Before
execution
After
execution
318
Series
Mnemonic
16-bit Instruction
P
5 steps SUM
SUMP
Word device number storing the source data
Word device number storing the result data
Digit Specification
/FX
3U
D
S
1
D
S
, the zero flag M8020 turns ON.
1
FNC 43
S
D
SUM
Word data
b15
b14
b13
K21847
S
0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1
9
K0
D
0
0
b15
b14
b13
K21847
S
0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1
K9
D
0
0
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Description
Word Devices
Special
System User
Unit
C D R U \G
PLCs.
3UC
is counted, and stored to
Number of bits in the
ON status in
S
16-bit data
b12
b11
b10
b9
b8
b7
b6
b5
8
7
6
5
0
0
0
0
0
0
0
0
b12
b11
b10
b9
b8
b7
b6
b5
32 16 8 4 2 1
0
0
0
0
0
0
0
0
12 Data Operation – FNC 40 to FNC 49
12.4 FNC 43 – SUM / Sum of Active Bits
Mnemonic
32-bit Instruction
DSUM
9 steps
DSUMP
Con-
Real
Index
stant
Number
V
Z Modify K H
E
D
D
.
1
D
b4
b3
b2
b1
b0
4
3
2
1
(Number of "1" (ON))
0
0
0
0
0
0
b4
b3
b2
b1
b0
0
0
1
0
0
1
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Data type
16- or 32-bit binary
16- or 32-bit binary
Others
Charac-
Pointer
ter String
" "
P

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3gc seriesFx3uc series

Table of Contents