![FATEK FBs Series Скачать руководство пользователя страница 168](http://html1.mh-extra.com/html/fatek/fbs-series/fbs-series_manual_3764826168.webp)
Advanced Function Instruction
7 -4
FUN 25
D
P
MEAN
MEAN
(Average of the block data)
FUN 25
D
P
MEAN
S : Source register number
N : Number of registers to be averaged
(N units of successive registers starting from S
)
D : Register number for storing result (mean value)
The S, N, D may combine with V, Z, P0~P9 to
serve indirect address application
WX
WY
WM
WS TMR CTR
HR
IR
OR
SR
ROR DR
K
XR
Range
Ope-
rand
WX0
∣
WX240
WY0
∣
WY240
WM0
∣
WM1896
WS0
∣
WS984
T0
∣
T255
C0
∣
C255
R0
∣
R3839
R3840
∣
R3903
R3904
∣
R3967
R3968
∣
R4167
R5000
∣
R8071
D0
∣
D4095
2
∣
256
V
、
Z
P0~P9
S
○
○
○
○
○
○
○
○
○
○
○
○
○
N
○
○
○
○
○
○
○
○
○
○
○
○
○
○
D
○
○
○
○
○
○
○
○
*
○
*
○
○
z
When operation control "EN" = 1 or "EN
↑
" (
P
instruction) from 0 to 1, add the N successive 16-bit or 32-bit
(
D
instruction) numerical values starting from S, and then divided by N. Store this mean value (rounding off
numbers after the decimal point) in the register specified by D.
z
While the N value is derived from the content of the register, if the N value is not between 2 and 256, then the
N range error "ERR" will be set to 1, and do not execute the operation.
S :
N :
D :
3
25P.MEAN
X0
EN
ERR
R 0
R 10
z
At left, the example program gets the mean value of the
3 successive 16-bit registers starting from R0, and stores
the results into the 16-bit register R10
R0
123
R1
9
S
(N
=
3)
R2
788
123
+
9
+
788
Ø
X0
=
3
=
306
(
Rouding off the remainder
)
D
R10
306
Содержание FBs Series
Страница 78: ...MEMO ...
Страница 111: ...4 6 X0 X1 Node A Y0 Y1 Node B differential down Incerse differential up t Scan time Inverse t t ...
Страница 141: ...Basic Function Instruction 6 16 FUN 2 SKP SKIP START FUN 2 SKP Y2 Y1 Y0 T201 10S X0 X1 X2 0 10 0 ...
Страница 305: ...MEMO ...
Страница 348: ...MEMO ...