Fnc140 - Wsum / Sum Of Word Data - Mitsubishi Electric MELSEC FX3U Programming Manual

Melsec fx series programmable logic controllers
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
19.1
FNC140 – WSUM / Sum of Word Data
Outline
This instruction calculates the sum of consecutive 16-bit or 32-bit data.
When calculating the addition data (sum value) in units of byte (8 bits), use the CCD (FNC 84) instruction.
1. Instruction format
FNC 140
D
P
WSUM
2. Set data
Operand type
S
D
n
3. Applicable devices
Bit Devices
Oper-
and
System User
Type
X Y M T C S D .b KnX KnY KnM KnS T C D R U \G
S
D
n
Explanation of function and operation
1. 16-bit operation (WSUM and WSUMP)
The sum of "n" 16-bit data starting from
Command
input
S
Mnemonic
16-bit Instruction
7 steps WSUM
WSUMP
Head device number storing data whose sum is calculated
Head device number storing sum
Number of data (0 < n)
Digit Specification
S
FNC140
S
D
WSUM
K4444
+0
K3333
+1
"n"
K1234
+2
points
K-5426
+3
(n = 6)
+4
K326
+5
K10000
19 Data Operation 2 – FNC140 to FNC149
19.1 FNC140 – WSUM / Sum of Word Data
→ For CCD (FNC 84) instruction, refer to Section 16.5.
Operation Condition
32-bit Instruction
Continuous
13 steps
Operation
Pulse (Single)
Operation
Description
Word Devices
Special
System User
Index
Unit
V Z Modify K H
is stored as 32-bit data in [
n
Sum of
"n" data
[
+1,
]
D
D
K13911
Mnemonic
Operation Condition
Continuous
DWSUM
Operation
Pulse (Single)
DWSUMP
Operation
Data type
16- or 32-bit binary
32- or 64-bit binary
16- or 32-bit binary
Others
Con-
Real
Charac-
stant
Number
ter String
E
" "
+1,
].
D
D
11
12
13
14
15
Pointer
P
16
17
18
19
20
555

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents