Dwsum, Dwsump - Mitsubishi MELSEC-Q/L Programming Manual

Table of Contents

Advertisement

Program Example
(1) The following program adds the 16-bit BIN data from D10 to D14, and stores it in D100 and D101 when X1C is turned
ON.
[Ladder Mode]
[Operation]
D10
4500 (BIN)
D11
2500 (BIN)
D12
3276 (BIN)
D13
6780 (BIN)
D14
4444 (BIN)
7.5.14

DWSUM, DWSUMP

Calculation of totals for 32-bit data
7.5.14
DWSUM, DWSUMP
DWSUM
DWSUMP
: Head number of the devices where data to be summed are stored (BIN 32 bits)
S
: Head number of the devices where the sum will be stored (BIN 64 bits)
D
n
: Number of data blocks (BIN 16 bits)
Internal Devices
Setting
Data
Bit
––
S
D
n
Function
(1) Adds all 32-bit BIN data stored in n points of devices starting from the one designated by
points of devices (4 words) starting from the one designated by
S
+ 1,
S
+ 3,
S
+ 5,
S
+ 7,
S
+ 9,
[List Mode]
Step
14948 (BIN)
D101,D100
Command
Command
R, ZR
Word
Bit
S
32767000 (BIN)
S
+ 2
6000 (BIN)
S
+ 4
35392000 (BIN)
S
+ 6
11870000 (BIN)
S
+ 8
12345000 (BIN)
Instruction
Device
High
Basic
performance
S
DWSUM
DWSUMP
S
J
\
U
\G
Word
––
––
.
D
n
D
to
D
+ 3
68640000 (BIN)
DWSUM, DWSUMP
Process
LCPU
Redundant Universal
n
D
n
D
Constants
Zn
Other
K, H
––
––
––
––
––
, and stores the result to 4
S
1
2
3
4
4
6
7
8
379

Advertisement

Table of Contents
loading

Table of Contents