![background image](http://html1.mh-extra.com/html/ls-industrial-systems/xbc-dn10e/xbc-dn10e_user-manual_1943831318.webp)
Chapter 6 Instruction and Flag List
XBC E-Type Main Unit
6-201
Ver. 1
6.32 Data Process Instruction
6.32.1 BSUM, BSUMP, DBSUM, DBSUMP
Instruction
Area Available
Step
Flag
P M K
F
L
T
C
S
Z D.x R.x
Con
st
U
N
D
R
Error
(F110)
Zero
(F111)
Carry
(F112)
BSUM(P)
DBSUM(P)
S
O O O O O O O
-
O
-
-
O O O O O
2~4
-
O
-
D
O O O
-
O O O
-
O
-
-
-
O O O O
Operand
Description
Data Type
S
Address of word data to count the number of 1s
WORD/DWORD
D
Address to save the counting result
WORD
[Flag Setting]
Flag
Description
Device Number
Zero
To be set if operation result is Zero
F111
1) BSUM (Bit Summary)
(1) Saves the result of the counted bit number of 1s among specified word data S1 in D using Hexadecimal.
(2) When operation result is 0, Zero Flag will be set.
(Number of 1's count)
(Number of 1's is 8)
Execution
b15
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
D
b0
b15
b0
0
1
1
0
0
1
0
1
0
1
1
1
0
0
0
1
S
2) DBSUM (Double Bit Summary)
(1) Saves the result of the counted bit number of 1s among specified double word data S1 in D using
Hexadecimal.
(2) When operation result is 0, Zero Flag will be set.
1
0
0
1
0
1
1
0
0
1
0
0
1
0
1
0
S
h964A
Count number of ‘1’
Number of ‘1’ is 12
Execution
b16
b32
b15
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
D
h000C
b0
b15
b0
0
0
0
1
0
0
1
0
0
0
1
1
1
0
0
0
h1238
3) Program Example
(1) For D1000=h3333, if Input Signal P00000 is changed from Off to On status, It saves 8 in D1100.
BSUMP D1000 D1100
P00000
(D)BSUM
means BSUM
P S
D
(D)BSUMP
S
D
Summary of Contents for XBC-DN10E
Page 1: ......
Page 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...