Precautions During Programming
FP0
8
−
5
8.2
Handling BCD Data
8.2
Handling BCD Data
8.2.1
BCD Data
BCD is an acronym for binary
−
coded decimal, and means that each digit of a decimal
number is expressed as a binary number.
Example:
Expressing a decimal number in BCD:
Decimal number
BCD
(Binary
−
coded
decimal)
0110
0100
0101
Each digit is converted
to a binary number.
8.2.2
Handling BCD Data in the PLC
When inputting data from a digital switch to the PLC or outputting data to a 7
−
segment
display (with a decoder), the data must be in BCD form. In this case, use a data
conversion instruction as shown in the examples at below.
BCD arithmetic instructions “
F40 (B+)
to
F58 (DB
−
1)
” also exist which allow direct
operation on BCD data, however, it is normally most convenient to use BIN operation
instructions “
F20 (+)
to
F38(D
−
1)
” as operation in the PLC takes place in binary.
Input From a Digital Switch
Use the BCD
−
to
−
BIN conversion instruction
“F81 (BIN)”
.
1
9
9
2
PLC
BCD
↓
BIN
(Conversion
using
F81 (BIN)
instruction)
Digital
switch
0 0 0 1 1 0 0 1 1 0 0 1 0 0 1 0
Data inputted into
the PLC (BCD data)
1
9
9
2
0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 0
Data which can be
processed in the PLC
(BIN data)
Converted to 1992 in decimal data.
Summary of Contents for FP0 Series
Page 14: ...Table of Contents FP0 xii ...
Page 16: ...Overview FP0 1 2 ...
Page 82: ...S LINK Control Unit FP0 4 2 ...
Page 95: ...Chapter 5 I O Allocation 5 1 I O Number 5 3 5 2 Control Unit 5 4 5 3 Expansion I O Unit 5 5 ...
Page 96: ...I O Allocation FP0 5 2 ...
Page 100: ...I O Allocation FP0 5 6 5 3 Expansion I O Unit ...
Page 102: ...Installation FP0 6 2 ...
Page 112: ...Installation FP0 6 12 6 5 Installation Using FP0 Flat Type Mounting Plate ...
Page 114: ...Wiring FP0 7 2 ...
Page 198: ...High speed Counter Pulse Output PWM Output FP0 9 34 9 5 PWM Output Function ...
Page 200: ...General use Serial Communications FP0 10 2 ...
Page 210: ...Self Diagnostic and Troubleshooting FP0 11 2 ...
Page 220: ...Specifications FP0 12 2 ...
Page 234: ...Dimensions FP0 13 2 ...
Page 243: ...Chapter 14 Appendix ...
Page 380: ...14 138 14 7 ASCII Codes ...