Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 Reference Manual page 546

Programmable controllers
Hide thumbs Also See for SYSMAC CJ - REFERENCE MANUAL 08-2008:
Table of Contents

Advertisement

Conversion Instructions
Description
506
Area
Index Registers
Indirect addressing
using Index Registers
ASC(086) treats the contents of S as 4 hexadecimal digits, converts the des-
ignated digit(s) of S into their 8-bit ASCII equivalents, and writes this data into
the destination word(s) beginning with the specified byte in D.
Note Refer to Appendix A in the CS/CJ-series Programming Consoles Operation
Manual (W341) for a table of extended ASCII characters.
Parity
It is possible to specify the parity of the ASCII data for use in error control dur-
ing data transmissions. The leftmost bit of each ASCII character will be auto-
matically adjusted for even, odd, or no parity.
When no parity (0) is designated, the leftmost bit will always be zero. When
even parity (1) is designated, the leftmost bit will be adjusted so that the total
number of ON bits is even. When odd parity (2) is designated, the leftmost bit
of each ASCII character will be adjusted so that there is an odd number of ON
bits. The status of the parity bit does not affect the meaning of the ASCII code.
Examples of even parity:
When adjusted for even parity, ASCII "31" (00110001) will be "B1" (10110001:
parity bit turned ON to create an even number of ON bits); ASCII "36"
(00110110) will be "36" (00110110: parity bit remains OFF because the num-
ber of ON bits is already even).
Examples of odd parity:
When adjusted for odd parity, ASCII "36" (00110110) will be "B6" (10110110:
parity bit turned ON to create an odd number of ON bits); ASCII "46"
(01000110) will be "46" (01000110: parity bit remains OFF because the num-
ber of ON bits is already odd).
Examples of Di
When two or more digits are being converted, ASC(086) will read the bytes in
S from right to left and will wrap around to the rightmost byte if necessary. The
following diagram shows some example values for Di and the conversions that
they produce.
S
---
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
Di
First digit to convert
Number of
digits (n+1)
Left (1)
Section 3-12
Di
Right (0)
D

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cs seriesSysmac one nsj seriesSysmac cj series

Table of Contents