Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 45

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Programming Concepts
Data
Operand
Text string
Text string data is stored in ASCII
(one byte except for special charac-
ters) in order from the leftmost to the
rightmost byte and from the right-
most (smallest) to the leftmost word.
00 hex (NUL code) is stored in the
rightmost byte of the last word if
there is an odd number of charac-
ters.
0000 hex (2 NUL codes) is stored in
the leftmost and rightmost vacant
bytes of the last word + 1 if there is
an even number of characters.
ASCII characters that can be used in a text string includes alphanumeric characters, Katakana and sym-
bols (except for special characters). The characters are shown in the following table.
ASCII Characters
Bits 0 to 3
Binary
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
Hex
0
1
0000
0
0001
1
0010
2
0011
3
0100
4
0101
5
0110
6
0111
7
1000
8
1001
9
1010
A
1011
B
1100
C
1101
D
1110
E
1111
F
12
Data form
Description
---
2
3
4
5
0
@
P
Space
!
1
A
Q
2
B
R
"
#
3
C
S
$
4
D
T
%
5
E
U
&
6
F
V
'
7
G
W
(
8
H
X
)
9
I
Y
*
:
J
Z
+
;
K
[
,
<
L
\
-
=
M
]
.
>
N
^
/
?
O
_
Symbol
Range
Symbol
Examples
'ABCDE'
'A'
'B'
'C'
'D'
'E'
NUL
41
42
43
44
45
00
'ABCD'
'A'
'B'
'C'
'D'
NUL
NUL
41
42
43
44
00
00
Bits 4 to 7
6
7
8
9
`
p
a
q
b
r
c
s
d
t
e
u
f
v
g
w
h
x
i
y
j
z
k
{
l
|
m
}
n
~
o
Section 1-1
Application example
MOV$(664)
D100
D200
D100
41
D101
43
D102
45
D200
41
D201
43
D202
45
A
B
C
D
0
@
P
!
1
A
Q
"
2
B
R
#
3
C
S
$
4
D
T
%
5
E
U
&
6
F
V
'
7
G
W
(
8
H
X
)
9
I
Y
*
:
J
Z
+
;
K
[
,
<
L
\
-
=
M
]
.
>
N
^
/
?
O
_
42
44
00
42
44
00
E
F

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents