Mitsubishi Electric M800VW Series Programming Manual page 319

Plc programming
Hide thumbs Also See for M800VW Series:
Table of Contents

Advertisement

M800V/M80V Series PLC Programming Manual (1/2)
8 Function Instructions
8.9 Data Processing Instructions
SUM, SUMP, DSUM, DSUMP: 16-bit and 32-bit data bit check
Setting
Bit devices
data
X
Y
M
L
F
S
D
△ : This is not available with DSUM(P).
[Instruction symbol] [Execution condition]
SUM, DSUM
SUMP, DSUMP
 Setting data
Setting data
S
Head No. of the device that will count total number of bits that are at 1
D
Head No. of the device to store total number of bits
 Functions
SUM
 From the 16-bit data in the device designated by "S", stores the total number of bits that are at 1, in the device designated
by "D".
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4
1
1
0
0
1
0
S
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4
0
0
0
0
0
0
D
DSUM
 From the 32-bit data in the device designated by "S", stores the total number of bits that are at 1, in the device designated
by "D".
S+1
b31
b28b27
b24b23
S
1 0 0 1 1 1 1 0 0 1 0 1 0 0 1 1 1 0 0 0 0 0 0 0 1 1 1 1 0 1 1 0
D+1
b31
b28b27
b24b23
D
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
IB-1501667-B
Usable devices
B SB
T SM V
T
C
Meaning
b3 b2 b1 b0
1
1
0
0
1
1
0
0
Total number with value of 1
b3 b2 b1 b0
0
0
0
0
0
0
1
0
Total number with value of 1 stored as BIN
(There are 8 instances in the example)
b20b19
b16b15
b12b11
Total number with value of 1
b20b19
b16b15
b12b11
Total number with value of 1 stored as BIN
(There are 16 instances in the example)
Con-
Word devices
stant
D
R/ZR W SW SD
Z
K
0
1
0
0
S
b8 b7
b4 b3
D
b8 b7
b4 b3
298
Digit
Pointer
designa-
Index
tion
H
P
indicates the signs SUM/DSUM
S
D
P
S
D
Data type
BIN 16/32 bits
b0
b0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents