EasyManua.ls Logo

Delta AH500 - Page 445

Delta AH500
749 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 6 Applied Instructions
6-277
API
Instruction code Operand Function
1208 D MEAN P
S, D, n
Mean
Device
X Y M S T C HC D L SM SR E PR K 16#
“$” DF
S
D
n
Pulse instruction
16-bit instruction (7 steps)
32-bit instruction(7 steps)
AH500
AH500
AH500
Symbol:
S
Initial device Word/Double word
D
Device in which the mean is
stored
Word/Double word
n
Number of devices Word/Double word
Explanation:
1. After the values in the n devices starting from the device specified by S are added up, the
mean of the sum is stored in D.
2. If a remainder appears in the calculation, it is left out.
3. The operand n used in the 16-bit instruction should be within the range between 1 and 256,
and the operand n used in the 32-bit instruction should be within the range between 1 and 128.
4. Only the 32-bit instructions can use the 32-bit counter.
Example:
When X0.0 is ON, the values in the three registers starting from D0 are added up. After the values
are added up, the sum is divided by 3. The quotient is stored in D10, and the remainder is left out.
D0
D1
D2
D10
112
100
113
125
(D0+D1+D2)/3
D10
After the instruction
is executed
The quotient 2 is left out.

Table of Contents

Other manuals for Delta AH500

Related product manuals