7-20
Section
Conversion Instructions
440
Flags
ER:
The content of S is 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.
7-20-2
BINARY-TO-BCD – BCD(24)
S
: Source word (binary)
IR, SR, AR, DM, HR, LR
R
: Result word
IR, SR, AR, DM, HR, LR
Ladder Symbols
Operand Data Areas
BCD(24)
S
R
@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.
DM 6144 to DM 6655 cannot be used for R.
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.
S
R
BCD
Binary
BCD(24) can be used to convert binary to BCD so that displays on the Program-
ming 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 arith-
metic operations rather than binary arithmetic operations, e.g., when BCD and
binary values must be added.
Flags
ER:
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.
7-20-3
DOUBLE BCD-TO-DOUBLE BINARY – BINL(58)
S
: First source word (BCD)
IR, SR, AR, DM, HR, TC, LR
R
: First result word
IR, SR, AR, DM, HR, LR
Ladder Symbols
Operand Data Areas
BINL(58)
S
R
@BINL(58)
S
R
Limitations
This instruction is available in the
CPM2A/CPM2C only
.
DM 6144 to DM 6655 cannot be used for R.
Limitations
Description
Содержание SRM1 - PROGRAMING 02-2001
Страница 1: ...Programmable Controllers Cat No W353 E1 06 SYSMAC CPM1 CPM1A CPM2A CPM2C SRM1 V2 PROGRAMMING MANUAL ...
Страница 2: ...CPM1 CPM1A CPM2A CPM2C SRM1 V2 Programmable Controllers Programming Manual Revised February 2008 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 9: ...x ...
Страница 15: ...xvi ...