![background image](http://html1.mh-extra.com/html/omron/sysmac-c200h/sysmac-c200h_operation-manual_742423175.webp)
162
Some examples of Di values and the 4-bit binary to 8-bit ASCII conversions
that they produce are shown below.
0
1
2
3
S
Di: 0011
D
0
1
2
3
Di: 0030
S
0
1
2
3
Di: 0130
S
Di: 0112
0
1
2
3
S
1st half
2nd half
D
1st half
2nd half
D+1
1st half
2nd half
D
1st half
2nd half
D+1
1st half
2nd half
D
1st half
2nd half
D+1
1st half
2nd half
D+2
1st half
2nd half
The leftmost bit of each ASCII character (2 digits) can be automatically ad-
justed for either even or odd parity. If no parity is designated, the leftmost bit
will always be zero.
When even parity is designated, the leftmost bit will be adjusted so that the
total number of ON bits is even, e.g., 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: par-
ity bit turned OFF because the number of ON bits is already even). The sta-
tus of the parity bit does not affect the meaning of the ASCII code.
When odd parity is designated, the leftmost bit of each ASCII character will
be adjusted so that there is an odd number of ON bits.
Flags
ER:
Incorrect digit designator, or data area for destination exceeded.
Indirectly addressed DM word is non-existent. (Content of
*
DM word
is not BCD, or the DM area boundary has been exceeded.)
5-17
BCD Calculations
The BCD calculation instructions – INC(38), DEC(39), ADD(30), ADDL(54),
SUB(31), SUBL(55), MUL(32), MULL(56), DIV(33), DIVL(57), FDIV(79), and
ROOT(72) – all perform arithmetic operations on BCD data.
For INC(38) and DEC(39) the source and result words are the same. That is,
the content of the source word is overwritten with the instruction result. All
other instructions change only the content of the words in which results are
placed, i.e., the contents of source words are the same before and after exe-
cution of any of the other BCD calculation instructions.
STC(40) and CLC(41), which set and clear the carry flag, are included in this
group because most of the BCD operations make use of the Carry Flag (CY)
in their results. Binary calculations and shift operations also use CY.
Parity
BCD Calculations
Section 5-17
Содержание SYSMAC C200H
Страница 1: ...OPERATION MANUAL C200H CPU01 E 03 E 11 E SYSMAC Programmable Controllers Cat No W130 E1 05 ...
Страница 2: ...C200H Programmable Controllers CPU01 E 03 E 11 E Operation Manual Revised June 2003 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 8: ...TABLE OF CONTENTS ix Glossary 345 Index 363 Revision History 369 ...
Страница 342: ...336 Programmer Program Date Page Word Contents Notes Word Contents Notes Data Storage ...
Страница 374: ...Cat No W130 E1 05 C200H Programmable Controllers CPU01 E 03 E 11 E OPERATION MANUAL ...