EasyManua.ls Logo

Omron C200H - Data Conversion; Bcd-To-Binary - bin(23); Double Bcd-To-Double Binary - Binl(58)

Omron C200H
374 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...
149
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.
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.
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
Data Conversion Section 5-16

Table of Contents

Related product manuals