Example 6) Operation unit: 32 bits (SL) (specify a 16-bit device)
K -200
K 600
K -100
K 800
Value
Value
[S1]…DT10 [S2]…DT16 [D]…DT100
DT10・DT11
K 500
DT12・DT13
DT14・DT15
[i]…SL
DT100・DT103
Total value is given in 64-bit data, and the mean value is given in 32-bit data.
<Total/mean calculation range>
DT16・DT17
<Output result>
* Signed 64-bit integer
K 200
Value
* Signed 32-bit integer
Mean value
([D]+4, [D]+5)
Total value
([D] to [D]+3)
DT104・DT105
Example 7) Operation unit: Single-precision, floating-point real number (SF) (specify a 16-bit device)
SF 5.55E+00
SF 1.11E+00
SF 3.33E+00
SF 2.66E+01
Value
Value
[S1]…DT10 [S2]…DT24 [D]…DT100
DT10・DT11
SF 4.44E+00
DT12・DT13
DT14・DT15
[i]…SF
DT100・DT101
Total value is given in 32-bit data, and the mean value is given in 32-bit data.
<Total/mean calculation range>
DT16・DT17
<Output result>
* Single precision floating point
real number (32 bits)
SF 3.33E+00
Value
* Single precision floating point
real number (32 bits)
Mean value
([D]+2, [D]+3)
DT102・DT103
Total value
([D] and [D]+1)
SF 5.55E+00
SF 1.11E+00
SF 2.22E+00
DT18・DT19
SF 3.33E+00
DT20・DT21
DT22・DT23
DT24・DT25
■
Precautions for programming
● The end position of the total and the mean calculation range is the device that contains [S2].
Example) When the operation unit is 32 bits, the calculation range is the same whether a
device number of higher level or lower level is specified.
H CCDDEEFF
H 11223344
H 55667788
H 9900AABB
H CCDDEEFF
H 12345678
DT0・DT1
DT2・DT3
DT4・DT5
DT6・DT7
DT8・DT9
[S1]…DT2 [S2]…DT6
H 11223344
H 55667788
H 9900AABB
H 12345678
[S1]…DT2 [S2]…DT7
Total/mean
calculation
range
Total/mean
calculation range
DT0・DT1
DT2・DT3
DT4・DT5
DT6・DT7
DT8・DT9
● Data is overwritten if [D] (total and mean calculation results) is specified within the total and
the mean calculation range.
10.5 MEAN (Acquiring the Total and the Mean Value)
10-22 WUME-FP7CPUPGR-12