7 Applied Instructions
7.2 Move and Compare
172
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
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) When handling 32-bit data in a structured program, a 16-bit device cannot be specified directly as in the
case of a simple project. Use a label to handle 32-bit data.
A 32-bit counter can be specified directly as it is a 32-bit long device.
Use a global label to specify a device.
2) The FX
0, FX0S or FX0N PLC does not support the instructions of pulse operation type.
To execute pulse operation, make the instruction execution condition pulse type.
3) Because conversion between binary-coded decimal data and binary data is automatically executed in
SEGL and ARWS instructions, BCD instruction is not required.
4) 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.
5) Some restrictions to applicable devices
S1:The FX
3U, FX3UC and FX3G 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
Label2
*2
Label1
*1
M8023
M8023
*1 This defines D0.
*2 This defines D2.
DBCD
EN
s
ENO
d
M8000
D0
D3 D2
Binary float value
Decimal float value
Variable