7 BASIC INSTRUCTIONS
7.4 Bit Processing Instructions
277
7
Performing a 32-bit test
DTEST(P)
These instructions take bit data at position specified by (s2) from device specified by (s1) and write to bit device specified by
(d).
Setting data
■
Descriptions, ranges, and data types
■
Applicable devices
*1 T, ST, C cannot be used.
Processing details
• These instructions take bit data at position specified by (s2) from device specified by (s1), (s1) +1 and write to bit device
specified by (d).
• If relevant bit is "0", device specified by (d) is turned OFF, and if it is "1", device is turned ON.
• For (s2) specify the bit position (0 to 31) of double word data. If 32 or more is specified for (s2), the value of the remainder
of (s2)
32 is the bit position.
Ex.
For (s2) = 34, the remainder for 34
32 is "2", so it becomes data of b2.
Ladder diagram
Structured text
ENO:=DTEST(EN,s1,s2,d);
ENO:=DTESTP(EN,s1,s2,d);
FBD/LD
Operand
Description
Range
Data type
Data type (label)
(s1)
Device number where bit data to be extracted is stored
32-bit signed binary
ANY32
(s2)
Position of bit data to be extracted
0 to 31
16-bit unsigned binary
ANY16
(d)
Bit device number where extracted bit data is to be stored
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, S
T, ST, C, D, W,
SD, SW, R
U
\G
Z
LC
LZ
K, H
E
$
(s1)
(s2)
(d)
(1): (s2) bit (When (s2)=21)
(s1) (s2)
(d)
EN
ENO
d
s1
s2
∙∙∙
∙∙∙
∙∙∙
b31
b15
b16
b0
(d)
(s1)
b21
(s1)+1
(1)
Summary of Contents for MELSEC iQ-F FX5
Page 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 17: ...15 CONTENTS ...
Page 24: ...22 MEMO ...
Page 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Page 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Page 1107: ...I 1105 MEMO ...
Page 1111: ......