Omron SYSMAC CP Series Instruction & Reference Manual page 238

Cpu unit
Hide thumbs Also See for SYSMAC CP Series:
Table of Contents

Advertisement

2 Instructions
Operand Specifications
Area
CIO
WR
HR
S
DI
OK
OK
OK
D
Flags
Name
Error Flag
Function
ASC(086) treats the contents of S as 4 hexadec-
imal digits, converts the designated 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.
A parity specification (bits 12 to 15 of K) is pos-
sible in the leftmost bit of the ASCII code data,
and this can be converted to an odd or even par-
ity bit (the number of bits that are 1 of the eight
bits is adjusted to odd or even).
Hint
• The parity bit is appended to the data to enable detection of errors when the data is transmitted. By
adding this bit, the number of bits that are 1 in the data can be indicated as odd or even, and if the
number of 1s in the received data is not similarly odd or even, it is assumed that an error has
occurred.
Precaution
• When multiple digits are specified in the number of digits to be converted (K), the digits are converted
in order from the starting conversion digit going left (returns to digit 0 after digit 3), and the conversion
results are stored in order from the output position of D going to the left word side (in units of 8 bits).
• Among the data in the conversion result output word, data in positions that are not to be output are
held.
• When converting multiple digits, take care that D+1 and D+2CH do not exceed the area.
2-202
Word addresses
AR
T
C
DM
OK
OK
OK
OK
Label
P_ER
• ON if the content of Di is not within the specified ranges.
• OFF in all other cases.
Indirect DM addresses
Constants
@DM
*DM
---
OK
OK
OK
---
Operation
First digit to convert
S
1
2
HEX
Number of
digits (n+1)
ASCII
Left (1)
D
33
31
CP1E CPU Unit Instructions Reference Manual(W483)
CF
Pulse bits
TR bits
---
---
---
0
1/0
n
m
Di
m
3
Right (0)
32

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents