EasyManua.ls Logo

Omron SYSMAC CV Series - Binary-To-Bcd: Bcd(101)

Omron SYSMAC CV Series
636 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
(101)
BCD D00150 D00160
0000
06
220
The bit contents of words D00010 and D00011 after execution are:
0100000010010101
4095
D00010
0000111111111111
0FFF
D00011
5-17-2 BINARY-TO-BCD: BCD(101)
(101)
BCD S R
R: Result word CIO, G, A, DM, DR, IR
S: Source word CIO, G, A, T, C, DM, DR, IR
Operand Data AreasLadder Symbol
Variations
j BCD(101)
When the execution condition is OFF, BCD(101) is not executed. When the
execution condition is ON, BCD(101) converts the binary (hexadecimal) content
of S into the numerically equivalent BCD digits and outputs the BCD bits to R.
Only the content of R is changed; the content of S is left unchanged.
S
R
BCD
Binary
BCD(101) can be used to convert binary to BCD so that displays on a Peripheral
Device will appear in decimal rather than hexadecimal. It can also be used to
convert to BCD to perform BCD arithmetic operations rather than binary arith-
metic operations, e.g., when BCD and binary values must be added.
If the content of S exceeds 270F, the converted result will exceed 9999,
BCD(101) will not be executed, and the Error Flag (A50003) will be turned ON.
When the instruction is not executed, the content of R remains unchanged.
Note Refer to page 115 for general precautions on operand data areas.
Flags ER (A50003): Content of *DM word is not BCD when set for BCD.
Content of S exceeds 270F.
EQ (A50006): 0 has been placed in R
Example When CIO 000006 is ON in the following example, the content of word D00150 is
converted from binary to BCD and stored in D00160. The content of D00150 is
left unchanged.
Address Instruction Operands
00000 LD 000006
00001 BCD(101)
D00150
D00160
Description
Precautions
Conversion Instructions Section 5-17

Table of Contents

Related product manuals