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

Hide thumbs Also See for FX3U Series:
Table of Contents

Advertisement

FX
/FX
Series Programmable Controllers
3U
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) in the data of a specified device.
1. Instruction format
FNC 43
D
SUM
P
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 C D R U \G
S
S
1
S
D
2
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
FNC 43
Before
execution
After
execution
Mnemonic
16-bit Instruction
5 steps SUM
SUMP
Word device number storing the source data
Word device number storing the result data
Digit Specification
D
S
1
D
S
, the zero flag M8020 turns ON.
1
S
D
SUM
Word data
b15
b14
b13
b12
K21847
S
0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1
9
8
K0
D
0
0
0
0
b15
b14
b13
b12
K21847
S
0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1
K9
D
0
0
0
0
Operation Condition
32-bit Instruction
Continuous
Operation
Pulse (Single)
Operation
Description
Word Devices
Special
System User
Unit
V Z Modify K H
is counted, and stored to
Number of bits in the
ON status in
S
D
16-bit data
b11
b10
b9
b8
b7
b6
b5
b4
7
6
5
4
0
0
0
0
0
0
0
0
b11
b10
b9
b8
b7
b6
b5
b4
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
Operation Condition
Continuous
DSUM
9 steps
Operation
Pulse (Single)
DSUMP
Operation
Data type
16- or 32-bit binary
16- or 32-bit binary
Others
Con-
Real
Charac-
Index
stant
Number
ter String
E
" "
D
D
.
1
b3
b2
b1
b0
3
2
1
(Number of "1" (ON))
0
0
0
0
b3
b2
b1
b0
1
0
0
1
11
12
13
14
Pointer
15
P
16
17
18
19
20
301

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3uc seriesMelsec-f

Table of Contents