Fnc 18 - Bcd / Conversion To Binary Coded Decimal - Mitsubishi Electric MELSEC FX3U Programming Manual

Melsec fx series programmable logic controllers
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
9.9
FNC 18 – BCD / Conversion to Binary Coded Decimal
Outline
This instruction converts binary (BIN) data into binary-coded decimal (BCD) data.
Binary data is used in operations in PLCs. Use this instruction to display numeric values on the seven-
segment display unit equipped with BCD decoder.
1. Instruction format
FNC 18
D
BCD
2. Set data
Operand Type
S
D
3. Applicable devices
Bit Devices
Oper-
and
System User
Type
X Y M T C S D .b KnX KnY KnM KnS T C D R U \G
S
D
: This function is supported only in FX
Explanation of function and operation
1. 16-bit operation (BCD and BCDP)
This instruction converts the binary (BIN) data of
the converted BCD data to
• The data of
• The table below shows digit specification for
Command
input
FNC 18
D
K1Y000
K2Y000
K3Y000
K4Y000
276
Mnemonic
16-bit Instruction
P
BCD
5 steps
BCDP
Word device number storing the conversion source (binary) data
Word device number of the conversion destination (binary-coded decimal) data
Digit Specification
3U
.
D
can be converted if it is within the range from K0 to K9999 (BCD).
S
S
D
BCD
When "K4Y000" is specified
Number of digits
1
2
3
4
9.9 FNC 18 – BCD / Conversion to Binary Coded Decimal
Operation Condition
32-bit Instruction
Continuous
Operation
Pulse (Single)
Operation
Description
Word Devices
Special
System User
Unit
/FX
PLCs.
3UC
into binary-coded decimal (BCD) data, and transfers
S
and
.
S
D
PLC
BCD (FNC 18)
...
...
...
Y014
Y010 Y004 Y000
...
...
...
Y017
Y013 Y007 Y003
Data range
0 to 9
00 to 99
000 to 999
0000 to 9999
9 Move and Compare – FNC 10 to FNC 19
Mnemonic
Operation Condition
DBCD
9 steps
DBCDP
16- or 32-bit binary
16- or 32-bit binary
Others
Con-
Real
Index
stant
Number
V Z Modify K H
E
BIN
...
...
BCD
Continuous
Operation
Pulse (Single)
Operation
Data Type
Charac-
Pointer
ter String
" "
P

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents