Checking 32-Bit Binary Data - Mitsubishi Electric MELSEC iQ-R Series Programming Manual

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Checking 32-bit binary data

DSUM(P)
RnPCPU
RnCPU RnENCPU
(Process)
These instructions store the total number of "1" bits in the 32-bit binary data stored in the specified device.
Ladder
(s)
FBD/LD
EN
ENO
s
d
■Execution condition
Instruction
DSUM
DSUMP
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s)
Start device containing data in which the total number of "1"
bits is to be counted
(d)
Device for storing the total number of bits
EN
Execution condition
ENO
Execution result
■Applicable devices
Operand
Bit
X, Y, M, L,
SM, F, B, SB,
FX, FY
(s)
(d)
Processing details
• These instructions store the total number of "1" bits in the 32-bit binary data, which is stored in the device specified by (s),
in the device specified by (d).
(s)+1
b31
∙∙∙
1 0 0
1
1
1 0 0 1
0
1
b15
(d)
0 0 0
7 APPLICATION INSTRUCTIONS
916
7.20 Data Processing Instructions
RnPCPU
RnSFCPU RnSFCPU
(Redundant)
(Standard)
(Safety)
(d)
Execution condition
Word
J\
T, ST, C, D, W,
SD, SW, FD, R,
ZR, RD
(s)
b16
b15
∙∙∙
0 0 1 1 1
0 0 0
1
0
0 0 0 1
1
∙∙∙
b8b7
∙∙∙
b0
0
0
0 0 0 0
0
0
1 0 0 0 0
ST
ENO:=DSUM(EN,s,d);
ENO:=DSUMP(EN,s,d);
Range
-2147483648 to 2147483647
U\G, J\,
Z
U3E\(H)G
The total number of 1s is stored in binary. (Sixteen 1s in the left example)
b0
1
1 0 1 1 0
Data type
32-bit signed binary
16-bit signed binary
Bit
Bit
Double word Indirect
specification
LT, LST,
LZ
LC
Data type (label)
ANY32
ANY16
BOOL
BOOL
Constant
Others
K, H E
$

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents