Delta AH500 Programming Manual page 461

Hide thumbs Also See for AH500:
Table of Contents

Advertisement

API
Instruction code
1217
D
WSUM
Device X
Y
M
S
n
D
Symbol:
Explanation:
1.
The signed decimal values in S~S+n-1 are added up, and the sum is stored in the register
specified by D.
B in ar y val ue s
B in ar y val ue s
2.
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.
3.
Only the 32-bit instructions can use the 32-bit counter.
Example:
When the instruction WSUM is executed, the values in D0~D2 are added up, and the sum is stored
in D10.
Operand
S, n, D
P
S
T
C
HC
D
Pulse instruction 16-bit instruction (7 steps) 32-bit instruction (7 steps)
AH500
S : Data source
n : Data length
D : Operation result
S
S
+1
S
+2
n
S
+3
S
+4
S
+5
S
+1
S
S
+3
S
+2
S
+5
S
+4
S
S
+7
+6
S
+9
S
+8
Ch a pt er 6 Ap p l i ed I ns t r uc t i ons
Getting the sum
L
SM SR
E
PR
AH500
Word/Double word
Word/Double word
Double word/Long word
D
+1
B in ar y val ue
D
+1
D
+3
n
B in ar y val ue
Function
K
16# "$"
DF
AH500
D
D
D
+2
6 - 2 9 3

Advertisement

Table of Contents
loading

Table of Contents