![Omron CJ1G-CPUxx Instructions Manual Download Page 737](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_742491737.webp)
716
Data Control Instructions
Section 3-18
3-18-9 AVERAGE: AVG(195)
Purpose
Calculates the average value of an input word for the specified number of
cycles.
Ladder Symbol
Variations
Applicable Program Areas
Operands
N: Number of Cycles
The number of cycles must be between 0001 and 0040 hexadecimal (0 to 64
cycles).
R: Result Word and R+1: First Work Area Word
R will contain the average value after the specified number of cycles. R+1 pro-
vides information on the averaging process and R+2 to R+N+1 contain the
previous values of S as shown in the following diagram.
∆
X
(0200)
∆
Y (0FA0 Hex)
∆
Y
∆
X
P1:
P1+1:
P1+2:
P1+3:
P1+4:
Contents of R (2011, signed binary)
Contents of S (D00000, signed BCD)
Min. conversion
Offset
Max. conversion
P1
R
S: Source word
N: Number of cycles
R: Result word
R+1: First work area word
AVG(195)
S
N
R
Variations
Executed Each Cycle for ON Condition
AVG(195)
Executed Once for Upward Differentiation
Not supported.
Executed Once for Downward Differentiation Not supported.
Immediate Refreshing Specification
Not supported.
Block program
areas
Step program
areas
Subroutines
Interrupt tasks
Not allowed
OK
OK
OK
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...