![background image](http://html1.mh-extra.com/html/omron/sysmac-c200hs/sysmac-c200hs_operation-manual_742436246.webp)
236
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 C200HS
Страница 1: ...Cat No W235 E1 05 C200HS SYSMAC Programmable Controllers...
Страница 2: ...C200HS Programmable Controllers Operation Manual Revised February 2002...
Страница 3: ...iv...
Страница 5: ...vi...
Страница 379: ...371 SR word Corresponding key s Bit 279 03 04 05 3 06 07 VER 08 09 Monitoring Operation and Modifying Data Section 7 1...
Страница 470: ...468 Programmer Program Date Page Word Contents Notes Word Contents Notes Data Storage...
Страница 471: ...469 Programmer Program Date Page TC address T or C Set value Notes TC address T or C Set value Notes Timers and Counters...