434
6 BASIC INSTRUCTIONS
6.6 Data Conversion Instructions
Converting 16-bit binary data block to BCD 4-digit data block
BKBCD(P)
These instructions convert the n points of binary data (0 to 9999) starting from the specified device to BCD data.
■Execution condition
■Description, range, data type
*1 When specifying setting data by using a label, define an array to secure enough operation area and specify an element of the array
label.
■Applicable devices
Ladder ST
ENO:=BKBCD(EN,s,n,d);
ENO:=BKBCDP(EN,s,n,d);
FBD/LD
Instruction Execution condition
BKBCD
BKBCDP
Operand Description Range Data type Data type (label)
(s) Start device where the binary data is stored 16-bit signed binary ANY16
*1
(d) Start device for storing the converted BCD data BCD 4-digit ANY16
*1
(n) Number of variables 0 to 65535 16-bit unsigned binary ANY16
EN Execution condition Bit BOOL
ENO Execution result Bit BOOL
Operand Bit Word Double word Indirect
specification
Constant Others
X, Y, M, L,
SM, F, B, SB,
FX, FY
J\ T, ST, C, D, W,
SD, SW, FD, R,
ZR, RD
U\G, J\,
U3E\(H)G
Z LT, LST,
LC
LZ K, H E $
(s)
(d)
(n)
RnCPU
RnENCPU
RnSFCPU RnSFCPURnPCPURnPCPU
(Standard) (Safety)
(Redundant)
(Process)