beautypg.com

Instructions fun 164 ave average value – Toshiba 6F3B0253 User Manual

Page 230

background image

6F3B0253

228

T1-16S 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

Register

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

(Average value)

D0205

200

D0206

-300

D0207

20000

D0208

-30

D0209

20