
510
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
19 Data Operation 2 – FNC140 to FNC149
19.1 FNC140 – WSUM / Sum of Word Data
2. 32-bit operation (DWSUM and DWSUMP)
The sum of "n" 32-bit data starting from [
+1,
] is stored as 64-bit data in [
+3,
+2,
+1, ].
Related instruction
Caution
In the 32-bit operation, the acquired sum is 64-bit data. FX
3U
and FX
3UC
PLCs cannot handle 64-bit data.
When the sum is within the numeric range of 32-bit data (K-2,147,483,648 to K2,147,483,647), however,
FX
3U
and FX
3UC
PLCs can handle the low-order 32 bits of 32-bit data as the sum while ignoring the high-
order 32 bits.
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is
stored in D8067.
• When "n" points starting from
are outside the specified device range (error code: K6706)
• When "n" is smaller than or equivalent to "0" (error code: K6706)
Program example
In the program shown below, the sum of 16-bit data stored in D10 to D14 is stored in [D101, D106].
Instruction
Description
CCD (FNC 84)
Check code
Calculates the sum of 16-bit data in units of byte (8 bits) and the horizontal parity.
S
S
D
D
D
D
[ +1, ]
[ +3, +2]
[ +5, +4]
[ +7, +6]
[ +9, +8]
FNC140
DWSUM
[ +3, +2, +1, ]
S
D
n
S
D
D
K32767000
K6000
K35392000
K-11870000
K12345000
K68640000
S
S
S
S
S
S
S
D
D
S
S
Command
input
Sum of
"n" data
"n"
points
(n = 5)
S
X010
FNC140
WSUMP
D10
D100
[D101,D100]
K5
WSUMP
instruction
K4500
K2500
K-3276
K6780
K4444
D10
K14948
END
D11
D12
D13
D14
Содержание FX3U Series
Страница 1: ...PROGRAMMING MANUAL Basic Applied Instructions Edition FX3U FX3UC SERIES PROGRAMMABLE CONTROLLERS ...
Страница 2: ......
Страница 889: ......