148
5-16
Data Conversion
The conversion instructions convert word data that is in one format into an-
other format and output the converted data to specified result word(s). Con-
versions are available to convert between binary (hexadecimal) and BCD, to
7-segment display data, to ASCII, and between multiplexed and non-multi-
plexed data. All of these instructions change only the content of the words to
which converted data is being moved, i.e., the content of source words is the
same before and after execution of any of the conversion instructions.
5-16-1
BCD-TO-BINARY – BIN(23)
S
: Source word (BCD)
IR, SR, AR, DM, HR, TC, LR
R
: Result word
IR, AR, DM, HR, LR
Ladder Symbols
Operand Data Areas
BIN(23)
S
R
@BIN(23)
S
R
When the execution condition is OFF, BIN(23) is not executed . When the
execution condition is ON, BIN(23) converts the BCD content of S into the
numerically equivalent binary bits, and outputs the binary value to R. Only
the content of R is changed; the content of S is left unchanged.
S
R
BCD
Binary
BIN(23) can be used to convert BCD to binary so that displays on the Pro-
gramming Console or any other programming device will appear in hexadeci-
mal rather than decimal. It can also be used to convert to binary to perform
binary arithmetic operations rather than BCD arithmetic operations, e.g.,
when BCD and binary values must be added.
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 0 is placed in R.
5-16-2
DOUBLE BCD-TO-DOUBLE BINARY – BINL(58)
S
: First source word (BCD)
IR, SR, AR, DM, HR, TC, LR
R
: First result word
IR, AR, DM, HR, LR
Ladder Symbols
Operand Data Areas
BINL(58)
S
R
@BINL(58)
S
R
Description
Flags
Data Conversion
Section 5-16
Содержание SYSMAC C1000H
Страница 1: ...Cat No W140 E1 04 Programmable Controllers SYSMAC C1000H C2000H...
Страница 2: ...C1000H C2000H Programmable Controllers Operation Manual Revised May 2003...
Страница 3: ...iv...
Страница 5: ...vi...
Страница 395: ...Cat No W140 E1 04 Note Specifications subject to change without notice Printed in Japan Authorized Distributor...
Страница 396: ...Cat No W140 E1 04 SYSMAC C1000H C2000H Programmable Controllers OPERATION MANUAL...