Delta AH500 Programming Manual page 647

Hide thumbs Also See for AH500:
Table of Contents

Advertisement

API
Instruction code
2113
$MIDR
Device X
Y
M
S
1
S
2
D
Symbol:
Explanation:
1.
Suppose the values in S
th
the n
character in the string in S
b15
Se con d AS CII co de
S1
Fourt h AS CII cod e
S1
+1
n+ 1 AS CII co de f rom th e las t
t h
n+ 3 AS CII co de f rom th e las t
t h
n+ m
ASCI I c ode fro m the las t
th
16#0 0
2.
If the data in S
is ABCDEFGHIJK, the value in S
1
characters starting from the third characters in the string are retrieved from the left. The
conversion result is as follows.
b15
b8
16#42(B)
S1
16#
44(D)
S1
+1
S1
16#
46(F )
+2
16#
48(H)
S1
+3
16#
4A(J )
S1
+4
16#
00
S1
+5
3.
If the value in S
+1 is 0, the instruction is not executed.
2
4.
If the value in S
+1 is -1, the characters in S
2
in S
to the last character in S
2
5.
If the data in S
is ABCDEFGHIJK, the value in S
1
conversion result is as follows.
Operand
P
S
, S
1
2
S
T
C
HC
D
Pulse instruction
AH500
: String
S
1
S
2
D :
and S
+1 are n and m respectively. The m characters starting from
2
2
are retrieved, and stored in D.
1
b7
b0
b8
First ASCI I c ode
Third A SCII co de
n A SCII c ode from t he las t
t h
n+ 2 AS CII co de f rom th e las t
t h
n+ m-1 AS CII co de f rom th e las t
t h
Las t ASCI I c ode
b7
b0
16#41(A)
16#
43(C)
S2
16#
45(E)
Thi rd cha ra cter
16#
47(G)
16#
49(I)
Se ven th ch ar acte r
16#
4B(K)
are retrieved.
1
Ch a pt er 6 Ap p l i ed I ns t r uc t i ons
, D
Retrieving a part of the string
L
SM SR
E
16-bit instruction (7-13 steps) 32-bit instruction
AH500
Part of the string which is
retrieved
Device in which the characters
retrieved are stored
b15
n+ 1 AS CII co de f rom th e las t
t h
n+ 3 AS CII co de f rom th e las t
t h
n+ m-2 AS CII co de f rom th e las t
t h
16#0 0
is 3, and the value in S
2
b15
b8
16#
44(D)
16#
46(F )
16#
48(H)
16#
00
starting from the character indicated by the value
1
is 5, and the value in S
2
Function
PR
K
16# "$"
DF
-
Word
Word
Word
b0
b8
b7
n A SCII c ode from t he las t
t h
D
n+ 2 AS CII co de f rom th e las t
t h
D
+1
n+ m-3
t h
AS CII co de f rom t he las t
n+ m-1 AS CII co de f rom th e las t
t h
+1 is 7, the seven
2
b7
b0
16#
43(C)
D
16#45(E)
D+1
16#
47(G)
D+2
D+3
16#
49(I)
+1 is -1, the
2
6 - 4 7 9

Advertisement

Table of Contents
loading

Table of Contents