Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 432

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

Sample program
When CIO 0.00 is ON in the following example, ASC(086) converts three hexadecimal digits in D100
(beginning with digit 1) into their ASCII equivalents and writes this data to D200 and D201 beginning
with the leftmost byte in D200. In this case, a digit designator of #0121 specifies no parity, the starting
byte (when writing) = leftmost byte, the number of digits to read = 3, and the starting digit (when
reading) = digit 1.
0.00
S
Di
D
Digits
S: D100
D: D200
D201
Example of ASCII code conversion
Content of conversion data digits
Value
Bit content
0
0
0
1
0
0
2
0
0
3
0
0
4
0
1
5
0
1
6
0
1
7
0
1
8
1
0
9
1
0
A
1
0
B
1
0
C
1
1
D
1
1
E
1
1
F
1
1
* Parity bit - changes according to the parity specification.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
D100
D200
Di: #
Number of digits
Starting digit
Starting byte
(leftmost byte)
Code
0
0
#30
0
1
#31
1
0
#32
1
1
#33
0
0
#34
0
1
#35
1
0
#36
1
1
#37
0
0
#38
0
1
#39
1
0
#41
1
1
#42
0
0
#43
0
1
#44
1
0
#45
1
1
#46
Conversion output data
(MSB) bit content (LSB)
*
0
1
1
*
0
1
1
*
0
1
1
*
0
1
1
*
0
1
1
*
0
1
1
*
0
1
1
*
0
1
1
*
0
1
1
*
0
1
1
*
1
0
0
*
1
0
0
*
1
0
0
*
1
0
0
*
1
0
0
*
1
0
0
3. Instructions
0
0
0
0
0
0
0
1
0
0
1
0
0
0
1
1
0
1
0
0
0
1
0
1
0
1
1
0
0
1
1
1
1
0
0
0
1
0
0
1
0
0
0
1
0
0
1
0
0
0
1
1
0
1
0
0
0
1
0
1
0
1
1
0
395
3

Advertisement

Table of Contents
loading

Table of Contents