Bit Test: Tst(350) And Tstn - Omron CVM1D Operation Manual

Hide thumbs Also See for CVM1D:
Table of Contents

Advertisement

Ladder Diagram Instructions

5-6-3 BIT TEST: TST(350) and TSTN(351)

Ladder Symbol
(350)
TST S N
(351)
TSTN S N
Description
Precautions
Flags
Example
0000
00
(350)
TST
0000
01
(351)
TSTN D00020
110
TST(350) turns ON the execution condition when the specified bit in the speci-
fied word is ON and turns OFF the execution condition when the bit is OFF.
TSTN(351) turns OFF the execution condition when the specified bit in the spe-
cified word is ON and turns ON the execution condition when the bit is OFF.
The bit position is designated in N between 0000 and 0015 in BCD.
TST(350) and TSTN(351) cannot be used as right-hand instructions, i.e., anoth-
er instruction must appear between them and the right bus bar.
N must be BCD between 0000 and 0015.
Note: Refer to page 101 for general precautions on operand data areas.
ER (A50003):
N is not 0000 to 0015 BCD.
Content of *DM word is not BCD.
In the first instruction line below, when CIO 000000 turns ON, TST(350) checks
whether the designated bit (bit 00 in D00010) is ON or OFF. In this case, because
it is ON, CIO 005000 is turned ON.
In the second instruction line below, when CIO 000001 turns ON, TST(350)
checks whether the designated bit (bit 05 in D00020) is ON or OFF. In this case,
because it is OFF, CIO 005001 is turned ON.
D00010
#0000
#0005
Operand Data Areas
S: Source word
CIO, G, A, DM, DR, IR
N: Bit number
CIO, G, A, T, C, #, DM, DR, IR
0050
00
0050
01
Section 5-6
Address Instruction
00000
LD
00001
TST(350)
00002
OUT
00003
LD
00004
TSTN(351)
00005
OUT
Designated bit
Designated bit
Operands
000000
D00010
#0000
005000
000001
D00020
#0005
005001

Advertisement

Table of Contents
loading

Table of Contents