Fnc140 - Wsum / Sum Of Word Data - Mitsubishi FX3G Series Programming Manual

Programmable controllers
Hide thumbs Also See for FX3G Series:
Table of Contents

Advertisement

FX
/FX
/FX
/FX
3G
3U
3GC
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
WSUM
P
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
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
2. 32-bit operation (DWSUM and DWSUMP)
The sum of "n" 32-bit data starting from [
].
D
Command
input
[
+1,
S
[
+3,
S
S
[
+5,
S
S
[
+7,
S
S
[
+9,
S
S
Series
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
is stored as 32-bit data in [
FNC140
S
D
WSUM
K4444
+0
K3333
+1
"n"
K1234
+2
points
K-5426
+3
(n = 6)
+4
K326
+5
K10000
S
FNC140
S
D
DWSUM
K32767000
]
S
K6000
+2]
"n"
K35392000
+4]
points
K-11870000
+6]
(n = 5)
+8]
K12345000
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
Unit
C D R U \G
V
D
n
Sum of
"n" data
[
+1,
D
D
K13911
+1,
S
] is stored as 64-bit data in [
n
Sum of
"n" data
[
+3,
D
D
K68640000
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-
Index
stant
Number
ter String
Z Modify K H
E
" "
+1,
D
].
]
D
+3,
D
+2,
+2,
+1,
]
D
D
11
12
13
14
15
Pointer
P
16
17
18
D
+1,
19
20
525

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3gc seriesFx3uc series

Table of Contents