436
6 BASIC INSTRUCTIONS
6.6 Data Conversion Instructions
Converting BCD 4-digit block data to 16-bit binary block data
BKBIN(P)
These instructions convert the n points of BCD data (0 to 9999) starting from the specified device to binary 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:=BKBIN(EN,s,n,d);
ENO:=BKBINP(EN,s,n,d);
FBD/LD
Instruction Execution condition
BKBIN
BKBINP
Operand Description Range Data type Data type (label)
(s) Start device where the BCD data is stored BCD 4-digit ANY16
*1
(d) Start device for storing the converted binary data 16-bit signed binary 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)