Delta AH500 Programming Manual page 643

Hide thumbs Also See for AH500:
Table of Contents

Advertisement

API
Instruction code
2111
$RIGHT
Device X
Y
M
S
n
D
Symbol:
Explanation:
1.
The instruction is used to retrieve n characters in the string in S from the right, and the
characters which are retrieved are stored in D.
2.
If n is 0, the value in D is 0.
S
S
+1
n-1
n-3
Second ASC II code from the last
n-1
D
n-3
D
+1
Second ASC II code from the last
If the data in S is ABCDEF12345 and n is 5, five characters in the string in S are retrieved from
the right. The conversion result is as follows.
b15
S
S
+1
ABCDE F12345
S
+2
S
+3
S
+4
S
+5
Operand
P
S, n, D
S
T
C
HC
D
Pulse instruction 16-bit instruction (7-13 steps) 32-bit instruction
AH500
S : String
Number of characters which are
n :
retrieved
Device in which the characters
D :
retrieved are stored
b15
Second A SCII code
F our th ASCII code
t h
A SCII c ode from the last
A SCII c ode from the last
t h
16#00
A SCII c ode from the last
t h
A SCII c ode from the last
t h
16#00
b8
b7
16#42(B)
16#41(A)
16#
44(D)
16#
43(C)
16#
46(F )
16#
45(E)
16#
32(2)
16#
31(1)
16#
34(4)
16#
33(3)
16#
00
16#
35(5)
Ch a pt er 6 Ap p l i ed I ns t r uc t i ons
The retrieve of the characters in the
string begins from the right.
L
SM SR
E
PR
AH500
b7
b8
b0
F irst ASCII code
T hi rd AS CII c ode
n
ASCII code fr om the las t
t h
n-2
A SCII c ode from the last
t h
T hi rd AS CII c ode from the l as t
F irst ASC II code from the last
n
ASCII code fr om the las t
t h
n-2
A SCII c ode from the last
t h
T hi rd AS CII c ode from the l as t
F irst ASC II code from the last
b0
b15
16#
32(2)
16#
34(4)
16#00
T he fifth charac ter from the last
Function
K
16# "$"
DF
-
Word
Word
Word
b8
b7
b0
D
16#31(1)
16#
33(3)
D
+1
16#
35(5)
D
+2
6 - 4 7 5

Advertisement

Table of Contents
loading

Table of Contents