Binary-To-Bcd - Bcd(24) - Omron C200H Operation Manual

Hide thumbs Also See for C200H:
Table of Contents

Advertisement

Data Conversion
Description
Flags
5-16-3
BINARY-TO-BCD – BCD(24)
Limitations
Description
Flags
150
When the execution condition is OFF, BINL(58) is not executed. When the
execution condition is ON, BINL(58) converts an eight-digit number in S and
S+1 into 32-bit binary data, and outputs the converted data to R and R+1.
S + 1
BCD
R + 1
Binary
ER:
The contents of S and/or S+1 words are not BCD.
Indirectly addressed DM word is non-existent. (Content of *DM word
is not BCD, or the DM area boundary has been exceeded.)
EQ:
ON when the result is zero.
Ladder Symbols
BCD(24)
@BCD(24)
S
R
If the content of S exceeds 270F, the converted result would exceed 9999
and BCD(24) will not be executed. When the instruction is not executed, the
content of R remains unchanged.
BCD(24) converts the binary (hexadecimal) content of S into the numerically
equivalent BCD bits, and outputs the BCD bits to R. Only the content of R is
changed; the content of S is left unchanged.
Binary
S
R
BCD
BCD(24) can be used to convert binary to BCD so that displays on the Pro-
gramming Console or any other programming 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 arithmetic operations, e.g.,
when BCD and binary values must be added.
ER:
S is greater than 270F.
Indirectly addressed DM word is non-existent. (Content of *DM word
is not BCD, or the DM area boundary has been exceeded.)
EQ:
ON when the result is zero.
S
R
S
R
Section 5-16
Operand Data Areas
S: Source word (binary)
IR, SR, AR, DM, HR, LR
R: Result word
IR, AR, DM, HR, LR

Advertisement

Table of Contents
loading

Table of Contents