6F3B0250
246
T1/T1S User’s Manual
7. Instructions
FUN 164 AVE Average value
Expression
Input
-
[
A
AVE (
n
)
B
]
-
Output
Function
When the input is ON, this instruction calculates the average value of the data stored in the
n
registers
starting with
A
, and stores the average value in
B
. The allowable range of the table size
n
is 1 to 64.
Execution condition
Input Operation Output
OFF No execution OFF
ON Execution ON
Operand
Name Device Re
g
ister Constant Index
X Y R S T. C. XW YW RW SW T C D I J K
A
Start of table
ÖÖÖÖÖÖÖ
n
Table size 1 - 64
B
Result
ÖÖÖÖÖÖÖÖÖ
Example
When R012 is ON, the average value of the data stored in the register table D0200 to D0209 (10
words), and the average value is stored in D0520.
D0200 100
D0201 10000
D0202 -1000
D0203 10
D0204 0 D0520 2900 (Avera
g
e value)
D0205 200
D0206 -300
D0207 20000
D0208 -30
D0209 20
T1S only
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net