APPENDICES
MELSEC-A
(2)
Procedure for converting data stored
in
a data register to printer output
data.
Since the PC CPU handles numerical data in binary,
it
is necessary to
convert data to
be
printed
out
from binary
(BIN)
to ASCII. Data is output
from the buffer memory to the printer sequentially from the lowest
address (head address) with the lower
8
bits to the higher
8
bits.
Therefore, use the sequence program to reorganize the order
of
the
data output to the printer. The following program, described in
(l),
gives an example
of
this conversion.
Example: Converting
'1234"
stored in the data register to ASCII
0
4
D
2H
BIN
0000010011010010D10
I
1
203
4
+
Wsnq
0000000000000011 D21
0000001000000001
w3
L
0~0~0(0~0(1~0(0
0
010
0
0
0
1 1
034
1o/o)o1o1o/o/1]o1o/olololololollJ~
+
0~0~1)0~0 o(111
010
0
1
D33
ASCl'-ersion
101011
11
~0~0~0(0)0~0)1(1~0/0~0~0~m
(3231
H)
+
&red
data
using the sequence program in
(1)
above
&rffernwmory
L
L
P
I
D35
APP-19
i
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com