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

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Conversion Instructions
Flags
Precautions
Examples
414
Name
Label
Error Flag
ER
An error will occur and the Error Flag will be turned ON if there is a parity error
in the ASCII data, the ASCII data in the source words is not equivalent to
hexadecimal digits, or the content of Di is not within the specified ranges.
When CIO 0.00 is ON in the following example, HEX(162) converts the ASCII
data in D100 and D101 according to the settings of the digit designator.
(Di=#0121 specifies no parity, the starting byte (when reading) is the leftmost
byte, the number of bytes to read is 3, and the starting digit (when writing) is
digit 1.)
HEX(162) converts three bytes of ASCII data (3 characters) beginning with
the leftmost byte of D100 into their hexadecimal equivalents and writes this
data to D200 beginning with digit 1.
0.00
D100
S
Di
D
D200
S: D100
D101
D: D200
When CIO 0.00 is ON in the following example, HEX(162) converts the ASCII
data in D100 beginning with the rightmost byte and writes the hexadecimal
equivalents in D200 beginning with digit 1.
The digit designator setting of #1011 specifies even parity, the starting byte
(when reading) is the rightmost byte, the number of bytes to read is 2, and the
starting digit (when writing) is digit 1.)
Operation
ON if there is a parity error in the ASCII data.
ON if the ASCII data in the source words is not equivalent
to hexadecimal digits
ON if the content of Di is not within the specified ranges.
OFF in all other cases.
Di: #
Starting byte
(leftmost byte)
Number of digits
Starting digit (digit 1)
3 digits
Section 3-11

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents