Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 712

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

AVG
Instruction
AVERAGE
Symbol
Applicable Program Areas
Function block
Area
definitions
Usage
OK
Operands
Operand
S
Source word
N
Number of cycles
R
Result first word
N: Number of Cycles
The number of cycles must be between 0001 and 0040 hexadecimal (0 to 64 cycles).
R: Result First Word and R+1: First Work Area Wor
R:
Average
R+1: Processing information
15
14
R+1
Average Valid Flag
OFF: Not valid (AVG(195) has not yet been executed the specified number of cycles.)
ON:
Valid.
R+2:
Previous value #1
R+N+1:
Previous value #N
Note R to R+N+1 must be in the same area.
Operand Specifications
Word addresses
Area
CIO
WR
HR
S, N
OK
OK
OK
R
Flags
Name
Error Flag
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Mnemonic
Variations
AVG
---
Block program areas
Step program areas
OK
OK
Description
0
Used by system.
AR
T
C
DM
EM
OK
OK
OK
OK
OK
Label
ER
• ON if the contents of N is 0.
• OFF in all other cases.
Function
code
Calculates the average value of an input word for
195
the specified number of cycles.
AVG
AVG(195)
S: Source word
S
N: Number of cycles
N
R
R: Result first word
Subroutines
OK
Data type
UINT
UINT
UINT
d
Indirect DM/EM
addresses
Con-
stants
@DM
*DM
DR
@EM
*EM
OK
OK
OK
OK
---
---
Operation
3. Instructions
Function
SFC action or
Interrupt tasks
transition programs
OK
OK
Size
1
1
Variable
Registers
Flags
Pulse
bits
Indirect
IR
TK
CF
using IR
---
OK
---
---
3
TR
bits
---
---
675

Advertisement

Table of Contents
loading

Table of Contents