486
6 BASIC INSTRUCTIONS
6.6 Data Conversion Instructions
Separating data in units of bytes
WTOB(P)
These instructions separate 16-bit binary data into (n) bytes.
■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:=WTOB(EN,s,n,d);
ENO:=WTOBP(EN,s,n,d);
FBD/LD
Instruction Execution condition
WTOB
WTOBP
Operand Description Range Data type Data type (label)
(s) Start device where the separation target data is stored 16-bit signed binary ANY16
*1
(d) Start device for storing the separated data 16-bit signed binary ANY16
*1
(n) Number of data bytes to be separated 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)