Bit And 32-Bit Data Checks (Sum(P),Dsum(P)) - Mitsubishi MELSEC Q Series Programming Manual

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

7.5.2

16-bit and 32-bit data checks (SUM(P),DSUM(P))

SUM(P),DSUM(P)
SUM, DSUM
SUMP, DSUMP
Setting
Data
S
D
Function
SUM
From the 16-bit data in the device designated by
is set, in the device designated by
DSUM
From the 32-bit data in the device designated by
is set, in the device designated by
Command
Command
: Head number of the devices where the total number of bits of "1" is counted (BIN 16/32 bits)
S
: Head number of the devices where the total number of the bits will be stored (BIN 16/32 bits)
D
Internal Devices
R, ZR
Bit
Word
b15
b8
S
1 1 0 0 1 0 1 1 0 0 1 1 0 0 0 1
b15
b8
D
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
Stores the total number of bits where 1 is set in BIN.
(There are 8 bits where 1 is set in the example.)
+1
S
b31
b16b15
1 0 0 1 1 1 0 0 1 0 1 0 0 1 1 1
b15
b8
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
D
Stores the total number of bits where 1 is set in BIN.
(There are 16 bits where 1 is set in the example.)
High
Basic
performance
indicates an instruction symbol of SUM/DSUM.
J
\
U
\G
Bit
Word
, stores the total number of bits where 1
S
.
D
b7
b0
Total number of bits where 1 is set
b7
b0
, stores the total number of bits where 1
S
.
D
S
b0
0 0 0 1 0 0 0 0 1 1 1 1 0 1 1 0
Total number of bits where 1 is set
b7
b0
SUM(P),DSUM(P)
Process
Redundant Universal
LCPU
S
D
P
S
D
Constants
Zn
Other
K, H
––
––
––
7-69
1
2
3
4
6
6
7
8

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents