Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
8 Applied Instructions (Move and Compare)
8.9 BCD / Conversion to Binary Coded Decimal
161
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
1
Outline
2
Instruction List
3
Configuration of
Instruction
4
How to Read
Explanation of
Instructions
5
Basic Instruction
6
Step Ladder
Instructions
7
Applied Instructions
(Program Flow)
8
Applied Instructions
(Move and
Compare)
9
Applied Instructions
(Arithmetic and
Logical Operation)
10
Applied Instructions
(Rotation and
Shift Operation)
Extension function(FXU and FX2C PLCs)
The FXU PLC of V2.30 or earlier does not support the extension function.
When executing the instruction with M8023 ON, conversion takes place from binary float to decimal float.
For the float conversion, only data register (D) is applicable as the device for and .
Related instruction
Cautions
1) Instructions of pulse operation type are not provided in the FX0, FX0S or FX0N PLC.
To execute pulse operation, make the instruction execution condition pulse type.
2) Because conversion between binary-coded decimal data and binary data is automatically executed in
SEGL and ARWS instructions, BCD instruction is not required.
3) Binary data is used in all operations in PLCs including arithmetic operations (+, -, × and ÷), increment and
decrement instructions.
When receiving the digital switch information in the binary-coded decimal (BCD) format into a PLC, use
BIN instruction for converting BCD data into binary data.
When outputting data to the seven-segment display unit handling binary-coded decimal (BCD) data, use
BCD instruction for converting binary data into BCD data.
4) Some restrictions to applicable devices
S1:The FX
3G, FX3GC, FX3U and FX3UC PLCs only are applicable.
S2:The FX
3U and FX3UC PLCs only are applicable.
Error
In BCD or BCDP (16-bit type) instructions, an operation error occurs when the value is outside the range
from 0 to 9,999.
In DBCD or DBCDP (32-bit type) instructions, an operation error occurs when the value is outside the
range from 0 to 99,999,999.
Instruction Function
BIN Converts binary-coded decimal (BCD) data into binary (BIN) data.
D1
X000
D2D0
M8023
M8023
DBCD
EN
s
ENO
d
M8000
D0
D3 D2
Binary float value
Decimal float value
Variable