EasyManua.ls Logo

LS Industrial Systems XBC-DR10E - Data Process Instruction

LS Industrial Systems XBC-DR10E
542 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 6 Instruction and Flag List
XBC E-Type Main Unit 6-201 Ve r. 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 0D
b0
b15 b0
0
1 1 0
0 1
0
1 0
1 1
1
0 0 0 1S
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 0S h964A
Count number of ‘1’
Number of ‘1’ is 12
Execution
b16b32
b15
0 0 0
0 0 0 0 0 0 0 0
0 1 1 0 0D 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

Table of Contents

Related product manuals