EasyManuals Logo
Home>Mitsubishi>Controller>MELSEC-Q/L

Mitsubishi MELSEC-Q/L User Manual

Mitsubishi MELSEC-Q/L
850 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #353 background imageLoading...
Page #353 background image
351
TEST, TESTP, DTEST, DTESTP
1
2
3
4
4
6
7
8
7.4 Bit processing instructions
7.4.2 TEST, TESTP, DTEST, DTESTP
Function
TEST
(1) Fetches bit data at the location designated by within the word device designated by , and writes it to the bit device
designated by .
(2) The bit device designated by is OFF when the relevant bit is "0" and ON when it is "1".
(3) The position designated by indicates the position of an individual bit in a 1-word data block (0 to 15). When 16 or
more is designated at , the target is the bit data at the position indicated by the remainder of n / 16. For example, when
n 18, the target is the data at b2 since the remainder of 18 / 16 1 is "2".
DTEST
(1) Fetches bit data at the location designated by within the 2-word device designated by , or +1, and writes it to the
bit device designated by .
(2) The bit device designated by is OFF when the relevant bit is "0" and ON when it is "1".
(3) The position designated by indicates the position of an individual bit in a 2-word data block (0 to 31). When 32 or
more is designated at , the target is the bit data at the position indicated by the remainder of n / 32. For example, when
n 34, the target is the data at b2 since the remainder of 34 / 32 1 is "2".
Operation Error
(1) There is no operation error in the TEST(P) or DTEST(P) instruction.
Program Example
(1) The following program turns M0 ON or OFF based on the status of the 10th bit in the 1-word data block (D0).
[Ladder Mode] [List Mode]
[Operation]
S2
S1
D
D
S2
S2
bit
b15 b0
b5
S1
D
S2
S2
(When =5)
S2
S1 S1
D
D
S2
S2
S1
D
b15 b0b31 b16b21
S1
+1
bit
S2
S2
(When =21)
Step Instruction Device
1
0
1 1
0 0
1 1
0
1 1
0
1
0
1
0
D0
b0b15 b10
Turns M0 OFF since b10 is "0."
0 0
1
0 0
1 1 1 1
0
1
0
0 0 0
1
D0
b0b15 b10
Turns M0 ON since b10 is "1."

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELSEC-Q/L and is the answer not in the manual?

Mitsubishi MELSEC-Q/L Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC-Q/L
CategoryController
LanguageEnglish

Related product manuals