![Omron SYSMAC C200HE Скачать руководство пользователя страница 278](http://html1.mh-extra.com/html/omron/sysmac-c200he/sysmac-c200he_operation-manual_742434278.webp)
260
For the first N–1 cycles when the execution condition is ON, AVG(––) writes the
value of S to D. Each time that AVG(––) is executed, the previous value of S is
stored in words D+2 to D+N+1. The first 2 digits of D+1 are incremented with
each execution and act as a pointer to indicate where the previous value is
stored. Bit 15 of D+1 remains OFF for the first N–1 cycles.
On the N
th
cycle, the previous value of S is written to last word in the range D+2 to
D+N+1. The average value of the previous values stored in D+2 to D+N+1 is cal-
culated and written to D, bit 15 of D+1 is turned ON, and the previous value point-
er (the first 2 digits of D+1) is reset to zero. Each time that AVG(––) is executed,
the previous value of S overwrites the content of the word indicated by the point-
er and the new average value is calculated and written to D. The pointer will be
reset again after reaching N–1.
The following diagram shows the function of words D to D+N+1.
D
Average value (after N or more cycles)
D+1
Previous value pointer and cycle indicator
D+2
Previous value #1
D+3
Previous value #2
D+N+1
Previous value #N
The function of bits in D+1 are shown in the following diagram and explained in
more detail below.
15 14
08 07
00
Previous value pointer
(2-digit hexadecimal from 0 to N–1.)
D+1:
Not used. Set to zero.
Cycle indicator
0 (OFF): cycles since execution of AVG(––) < N.
1 (ON):
cycles since execution of AVG(––)
≥
N.
Previous Value Pointer
The previous value pointer indicates the location where the most recent value of
S was stored relative to D+2, i.e., a pointer value of 0 indicates D+2, a value of 1
indicates D+3, etc.
Cycle Indicator
The cycle indicator is turned ON after AVG(––) has been executed N times. At
this point, D will contain the average value of the contents of words D+2 through
D+N+1. The average value is 4-digit hexadecimal and is rounded off to the near-
est integer value.
Flags
ER:
Indirectly addressed DM word is non-existent. (Content of
DM word is
not BCD, or the DM area boundary has been exceeded.)
One or more operands have been set incorrectly.
Special Math Instructions
Section 5-21
Содержание SYSMAC C200HE
Страница 1: ...Cat No W303 E1 09 OPERATION MANUAL Programmable Controllers C200HX C200HG C200HE ...
Страница 2: ......
Страница 3: ...C200HX C200HG C200HE Programmable Controllers Operation Manual Revised August 2004 ...
Страница 6: ...vi ...
Страница 10: ......
Страница 12: ......
Страница 380: ......
Страница 410: ......
Страница 438: ......
Страница 464: ......
Страница 474: ......
Страница 522: ......
Страница 538: ......
Страница 552: ...534 Programmer Program Date Page Word Contents Notes Word Contents Notes Data Storage ...
Страница 554: ......
Страница 560: ......
Страница 584: ......
Страница 585: ......
Страница 586: ...W303 E1 09 ...