84
#2000
CMP(20)
TIM 10
#3000
CMP(20)
TIM 10
CMP(20)
TIM 10
#4000
0201
0204
0202
0000
TIM 10
0200
1907
0200
1907
0201
1907
TIM 10
0500 s.
Output at
100 s.
Output at
200 s.
Output at
300 s.
Output at
500 s.
5–15 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
and between multiplexed and non-multiplexed 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 execu-
tion of any of the conversion instructions.
5–15–1 BCD to Binary – BIN(23)
S : Source word (BCD)
IR, SR, DM, HR, TC
R : Result word
IR, DM, HR
Ladder Symbol Operand Data Areas
BIN(23)
S
R
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.
Description
Data Conversion Section 5–15