6.6
Data Conversion Instructions
Converting binary data to BCD 4-digit data
BCD(P)
RnPCPU
RnCPU RnENCPU
(Process)
These instructions convert the specified 16-bit binary data to BCD 4-digit data.
Ladder
(s)
FBD/LD
EN
ENO
s
d
■Execution condition
Instruction
BCD
BCDP
Setting data
■Description, range, data type
Operand
Description
(s)
Binary data or the device where the binary data is stored
(d)
Device for storing the converted BCD data
EN
Execution condition
ENO
Execution result
■Applicable devices
Operand
Bit
X, Y, M, L,
SM, F, B, SB,
FX, FY
(s)
(d)
6 BASIC INSTRUCTIONS
378
6.6 Data Conversion Instructions
RnPCPU
RnSFCPU RnSFCPU
(Redundant)
(Standard)
(Safety)
(d)
Execution condition
Word
J\
T, ST, C, D, W,
SD, SW, FD, R,
ZR, RD
ST
ENO:=BCD(EN,s,d);
ENO:=BCDP(EN,s,d);
Range
0 to 9999
Double word Indirect
U\G, J\,
Z
LT, LST,
U3E\(H)G
LC
Data type
Data type (label)
16-bit signed binary
ANY16
BCD 4-digit
ANY16
Bit
BOOL
Bit
BOOL
Constant
specification
LZ
K, H E
Others
$