202
Work Bits (Internal Relays)
Section 4-5
changes occur in other bits. At least one other condition is used just before
the OUTPUT instruction to function as a reset. Without this reset, there would
be no way to control the operand bit of the OUTPUT instruction.
The above diagram for the KEEP instruction can be rewritten as shown below.
The only difference in these diagrams would be their operation in an inter-
locked program section when the execution condition for the INTERLOCK
instruction was ON. Here, just as in the same diagram using the KEEP
instruction, two reset bits are used, i.e., HR 0000 can be turned OFF by turn-
ing ON either IR 00004 or IR 00005.
4-5
Work Bits (Internal Relays)
In programming, combining conditions to directly produce execution condi-
tions is often extremely difficult. These difficulties are easily overcome, how-
ever, by using certain bits to trigger other instructions indirectly. Such
programming is achieved by using work bits. Sometimes entire words are
required for these purposes. These words are referred to as work words.
Work bits are not transferred to or from the PC. They are bits selected by the
programmer to facilitate programming as described above. I/O bits and other
dedicated bits cannot be used as works bits. All bits in the IR area that are not
allocated as I/O bits, and certain unused bits in the AR area, are available for
use as work bits. Be careful to keep an accurate record of how and where you
use work bits. This helps in program planning and writing, and also aids in
debugging operations.
Work Bit Applications
Examples given later in this subsection show two of the most common ways
to employ work bits. These should act as a guide to the almost limitless num-
ber of ways in which the work bits can be used. Whenever difficulties arise in
programming a control action, consideration should be given to work bits and
how they might be used to simplify programming.
Work bits are often used with the OUTPUT, OUTPUT NOT, DIFFERENTIATE
UP, DIFFERENTIATE DOWN, and KEEP instructions. The work bit is used
first as the operand for one of these instructions so that later it can be used as
a condition that will determine how other instructions will be executed. Work
bits can also be used with other instructions, e.g., with the SHIFT REGISTER
instruction (SFT(10)). An example of the use of work words and bits with the
SHIFT REGISTER instruction is provided in
5-17-1 SHIFT REGISTER –
SFT(10)
.
Although they are not always specifically referred to as work bits, many of the
bits used in the examples in
SECTION 5 Instruction Set
use work bits. Under-
standing the use of these bits is essential to effective programming.
Reducing Complex
Conditions
Work bits can be used to simplify programming when a certain combination of
conditions is repeatedly used in combination with other conditions. In the fol-
lowing example, IR 00000, IR 00001, IR 00002, and IR 00003 are combined
in a logic block that stores the resulting execution condition as the status of
IR 21600. IR 21600 is then combined with various other conditions to deter-
00002
00003
HR 0000
HR 0000
00004
00005
Address
Instruction
Operands
00000
LD
00002
00001
AND NOT
00003
00002
OR
HR
0000
00003
AND NOT
00004
00004
OR NOT
00005
00005
OUT
HR
0000
Содержание SYSMAC CQM1H Series
Страница 3: ...iv...
Страница 5: ...vi...
Страница 9: ......
Страница 11: ......
Страница 15: ...xvi...
Страница 87: ...62 Calculating with Signed Binary Data Section 1 7...
Страница 169: ...144 Serial Communications Board Section 2 6...
Страница 537: ......
Страница 565: ......
Страница 569: ......
Страница 573: ......
Страница 577: ......