Delta AH500 Programming Manual page 613

Hide thumbs Also See for AH500:
Table of Contents

Advertisement

API
Instruction code
2102
D
BCDDA
Device X
Y
M
S
D
Symbol:
Explanation:
1.
The binary-coded decimal number in S is converted into the ASCII code, and the conversion
result is stored in D.
2.
The instruction supports SM690, which controls the ending character.
3.
The binary-coded decimal value in S used in the 16-bit instruction should be within the range
between 0 and 9999, and should be a four-digit binary-coded decimal value. The operand D
occupies three word devices. The data is converted as follows.
b1 5
b1 2
b11
b8
b7
S
Thousands
Hundreds
place
place
If SM690 is OFF, 16#0000 is stored in D+2. If SM690 is ON, the value in D+2 is unchanged.
4.
The binary-coded decimal value in S used in the 32-bit instruction should be within the range
between 0 and 99999999, and should be an eight-digit binary-coded decimal value. The
operand D occupies five word devices. The data is converted as follows.
S +1
b0
b15 b12 b11 b8 b7 b4 b3
b15 b12 b11 b8 b7 b4 b3
If SM690 is OFF, 16#0000 is stored in D+5. If SM690 is ON, the value in D+5 is unchanged.
5.
Take the binary-coded decimal number 12098 in S for example. The digit in the hundred
thousands place of the number, the digit in the millions place of the number, and the digit in the
Operand
P
S, D
S
T
C
HC
D
Pulse instruction
AH500
S : Source value
Device in which the conversion
D :
result is stored
b15
ASCII code in
the hundreds place
b3
b0
b4
Tens place Units place
Ending c har acter (16#0000 or unc hanged)
b15
S
b0
ASCII code in the
ten thous ands plac e
Ch a pt er 6 Ap p l i ed I ns t r uc t i ons
Converting the binary-coded decimal
number into the ASCII code
L
SM SR
E
16-bit instruction (5 steps) 32-bit instruction (5 steps)
AH500
b8
b7
ASCII code in
the thousands place
ASCII code in
ASCII code in
the tens plac e
the units pl ac e
b8
b7
ASCII code in
ASCII code in
the milli ons place
the ten mill ions place
ASCII code in the hundred
thous ands place
ASCII code in
ASCII code in
the thous ands place
the hundreds pl ac e
ASCII code in
ASCII code in
the units pl ac e
the tens plac e
Ending c har acter ( 16#0000 or unchanged)
Function
PR
K
16# "$"
DF
AH500
Word/Double word
Word
b0
D
D
+1
D
+2
b0
D
D
+1
D
+2
D
+3
D +4
6 - 4 4 5

Advertisement

Table of Contents
loading

Table of Contents