346
6 BASIC INSTRUCTIONS
6.4 Bit Processing Instructions
Performing a 32-bit test
DTEST(P)
These instructions extract the 'n'th bit in the specified double-word device.
■Execution condition
■Description, range, data type
■Applicable devices
Ladder ST
ENO:=DTEST(EN,s1,s2,d);
ENO:=DTESTP(EN,s1,s2,d);
FBD/LD
Instruction Execution condition
DTEST
DTESTP
Operand Description Range Data type Data type (label)
(s1) Device where the extract target bit data is stored 32-bit signed binary ANY32
(s2) Extract target bit position 0 to 31 16-bit unsigned binary ANY16
(d) Device for storing the extracted bit data Bit ANY_BOOL
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 $
(s1)
(s2)
(d)
RnCPU
RnENCPU
RnSFCPU RnSFCPURnPCPURnPCPU
(Standard) (Safety)
(Redundant)
(Process)