Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual page 194

Table of Contents

Advertisement

3. Instructions
TR
Instruction
TR Bits
Function
TR bits are used to temporarily retain the ON/OFF status of execution conditions in a program when
programming in mnemonic code. They are not used when programming directly in ladder program form
because the processing is automatically executed by the Peripheral Device. The following diagram
shows a simple application using two TR bits.
0.00
Using TR0 to TR15
• TR0 to TR15 are used only with LOAD and
OUTPUT instructions.
• There are no restrictions on the order in
which the bit addresses are used.
• Sometimes it is possible to simplify a
program by rewriting it so that TR bits are
not required. The following diagram shows
one case in which a TR bit is unnecessary
and one in which a TR bit is required.
In instruction block (1), the ON/OFF status at
point A is the same as for output CIO 2.00, so
AND 0.01 and OUT 2.01 can be coded
without requiring a TR bit. In instruction block
(2), the status of the branching point and that
of output CIO 2.02 are not necessarily the
same, so a TR bit must be used. In this case,
the number of steps in the program could be
reduced by using instruction block (1) in place
of instruction block (2).
158
Mnemonic
Variations
TR
---
0.02
0.01
0.03
0.04
0.05
Function
code
TR bits are used to temporarily retain the ON/OFF
---
status of execution conditions in a program when
programming in mnemonic code.
Coding
Instruction
Operands
5.00
LD
0.00
OUT
TR0
5.01
AND
0.01
OUT
TR1
5.02
AND
0.02
OUT
5.00
LD
TR1
5.03
AND
0.03
OUT
5.01
LD
TR0
AND
0.04
OUT
5.02
LD
TR0
AND NOT
5.00
OUT
5.03
Relay Address
Temporary Relay
TR0 to TR15
0.00
0.01
0.02
0.03
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Function
2.00
2.01
(1)
2.02
(2)
2.03

Advertisement

Table of Contents
loading

Table of Contents