Performing A 32-Bit Test - Mitsubishi MELSEC iQ-F FX5 series Programming Manual

Melsec iq-f fx5 series
Hide thumbs Also See for MELSEC iQ-F FX5 series:
Table of Contents

Advertisement

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).
Ladder diagram
(s1)
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s1)
Device number where bit data to be extracted is stored
(s2)
Position of bit data to be extracted
(d)
Bit device number where extracted bit data is to be stored
■Applicable devices
Operand
Bit
X, Y, M, L,
SM, F, B, SB
(s1)
(s2)
(d)
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).
(s2) bit (When (s2)=21)
b31
···
b21
(s1)+1
• 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.
Operation error
There is no operation error.
6 BASIC INSTRUCTIONS
238
6.4 Bit Processing Instructions
(s2)
(d)
Word
U\G T, ST,
T, ST, C, D,
C, LC
W, SD, SW, R
···
b16
b15
···
(s1)
Structured text
ENO:=DTEST(EN,s1,s2,d);
ENO:=DTESTP(EN,s1,s2,d);
Range
0 to 31
Double word Indirect
U\G
Z
LC
LZ
b0
(d)
Data type
Data type (label)
32-bit signed binary
ANY32
16-bit unsigned binary
ANY16
Bit
ANY_BOOL
Constant
specification
K, H
E
$
Others

Advertisement

Table of Contents
loading

Table of Contents