Omron CS1G/H-CPUxxH Instructions Manual page 472

Sysmac cs series; sysmac cj series
Hide thumbs Also See for CS1G/H-CPUxxH:
Table of Contents

Advertisement

Conversion Instructions
Description
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.
Di
First digit to convert
Number of
digits (n+1)
Left (1)
Section 3-12
Right (0)
451

Advertisement

Table of Contents
loading

Table of Contents