Self-Maintaining Bits; The End Instruction - Omron SYSMAC C20P Operation Manual

Sysmac programmable controllers
Hide thumbs Also See for SYSMAC C20P:
Table of Contents

Advertisement

The End Instruction

4–4–4

Self-maintaining Bits

4–5

The End Instruction

42
In the following example, HR 000 will be turned ON when 0002 is ON and
0003 is OFF. HR 000 will then remain ON until either 0004 or 0005 turns ON.
0002
0004
0005
Although the Keep instruction can be used to create self-maintaining bits, it is
sometimes necessary to create self-maintaining bits in another way so that
they can be turned OFF when in an interlocked section of a program.
To create a self-maintaining bit, the operand bit of an Output instruction is
used as a condition for the same Output instruction in an OR setup so that
the operand bit of the Output instruction will remain ON or OFF until changes
in other bits occur. 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 in-
struction was ON. Here, just as in the same diagram using the Keep instruc-
tion, two reset bits are used, i.e., HR 000 is turned OFF by turning ON both
0004 and 0005.
0002
0003
HR 000
The last instruction in any program must be the End instruction. When the
CPU scans the program, it executes all instructions up to the first End in-
struction before returning to the beginning of the program and beginning exe-
cution again. Although an End instruction can be placed at any point in a pro-
gram, which is sometimes done when debugging, no instructions past the
first End instruction will be executed until it is removed.
0000
0001
0003
S: set input
R: reset input
0004
0005
Instruction
END(01)
Section 4–5
KEEP(11)
HR 000
HR 000
Program execution
ends here.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac c28pSysmac c40pSysmac c60p

Table of Contents