Explanation Of String Processing Instructions - Delta AH500 Programming Manual

Hide thumbs Also See for AH500:
Table of Contents

Advertisement

6.21.2 Explanation of String Processing Instructions

API
Instruction code
2100
D
BINDA
Device
X
Y
M
S
D
Symbol:
Explanation:
1.
The signed decimal binary 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 value in S used in the 16-bit instruction should be within the range between -32768 and
32767, and should be a six-digit binary number. The operand D occupies four word devices.
The data is converted as follows.
b15
S
16-bit bi nar y number
If SM690 is OFF, 16#0000 is stored in D+3. If SM690 is ON, the value in D+3 is unchanged.
Besides, if the value in S is a positive value, the sign character in D is 16#20. If the value in S
is a negative value, the sign character in D is 16#2D. For example, if the value in S is -12345
and SM690 is OFF, the conversion result is as follows.
b15
S
16-bit binar y number
4.
The value in S used in the 32-bit instruction should be within the range between -2147483648
and 2147483647, and should be an eleven-digit binary number. The operand D occupies six
word devices. The data is converted as follows.
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
b0
ten thousands plac e
b0
-12345
Ch a pt er 6 Ap p l i ed I ns t r uc t i ons
Converting the singed decimal
number into the ASCII code
L
SM SR
E
16-bit instruction (5 steps)
AH500
b8
b7
ASCII code in
ASCII code in
the hundreds place
the thousands plac e
ASCII code in
ASCII code in
the units pl ace
the tens plac e
Ending c har acter (16#00 or unchanged)
b15
b8
b7
16#31(1)
16#2D(-)
16#33(3)
16#32(2)
16#35(5)
16#34(4)
16#0000
Function
PR
K
16# "$"
DF
32-bit instruction (5 steps)
AH500
Word/Double word
Word
b0
Sign
(±)
D
+1
D
D
+2
+3
D
b0
D
D
+1
+2
D
D
+3
6 - 4 3 9

Advertisement

Table of Contents
loading

Table of Contents