Omron SYSMAC CJ - REFERENCE MANUAL 01-2008 Reference Manual page 849

Sysmac cs/cj/one nsj series programmable controllers
Table of Contents

Advertisement

Data Control Instructions
Flags
Precautions
810
turned ON. For all further cycles, the value in R will be updated for the most
current N values of S.
The maximum value of N is 64. If a value greater than 64 is specified, opera-
tion will use a value of 64.
The Previous Value Pointer will be reset to 0 after N–1 values have been writ-
ten.
The average value output to R will be rounded to the nearest integer.
S: Source word
R
R+1
R+2
R+3
R+N+1
Name
Label
Error Flag
ER
The contents of the First Work Area Word (D+1) is cleared to 0000 each time
the execution condition changes from OFF to ON.
The contents of the First Work Area Word (D+1) will not be cleared to 0000
the first time the program is executed at the start of operation. If AVG(195) is
to be executed in the first program scan, clear the First Work Area Word from
the program.
If N (Number of Cycles) contains 0000, an error will occur and the Error Flag
will turn ON.
When CIO 000000 is ON in the following example, the contents of D00100 will
be stored one time each scan for the number of scans specified in D00200.
The contents will be stored in order in the ten words from CIO 0302 to CIO
0311. The average of the contents of these ten words will be placed in CIO
0300 and then bit 15 of CIO 0301 will be turned ON.
N: Number of cycles
Pointer
Average Valid Flag
S
Cycle 1
S
Cycle 2
S
Cycle N
Operation
ON if the contents of N is 0.
OFF in all other cases.
Section 3-18
Average
N values

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents