Output And Output Not; The End Instruction - Omron SYSMAC mini SP10 Operation Manual

Table of Contents

Advertisement

Basic Programming
0000
0001
3-4-5

The END Instruction

0000
0001
3-4-6
Logic Block Instructions
44
used to control the status of the designated operand bit according to the ex-
ecution condition. With the OUTPUT instruction, the operand bit will be
turned ON as long as the execution condition is ON and will be turned OFF
as long as the execution condition is OFF. With the OUTPUT NOT instruc-
tion, the operand bit will be turned ON as long as the execution condition is
OFF and turned OFF as long as the execution condition is ON. These appear
as shown below. In mnemonic code, each of these instructions requires one
line.
0100
0101
In the above examples, bit 0100 will be ON as long as bit 0000 is ON and bit
0101 will be OFF as long as bit 0001 is ON. Here, bit 0000 and bit 0001 are
input bits and bit 0100 and bit 0101 are output bits, i.e., the signals coming in
through inputs 0 and 1 are controlling outputs 0 and 1, respectively.
The length of time that a bit is ON or OFF can be controlled by combining the
OUTPUT or OUTPUT NOT instruction with Timer instructions. Refer to Ex-
amples under 3-7-14 Timer - TIM for details.
The last instruction required to complete a simple program is the END in-
struction. When the CPU scans the program, it executes all instruction up to
the first END instruction before returning to the beginning of the program and
beginning execution again. Although an END instruction can be placed at
any point in a program, which is sometimes done when debugging, no in-
structions past the first END instruction will be executed until it is removed.
The number following the END instruction in the mnemonic code is its func-
tion code, which is used when inputting most instructions into the PC. These
are described later. The END instruction requires no operands and no condi-
tions can be placed on the same instruction line with it.
Instruction
Program execution
END(01)
ends here.
If there is no END instruction anywhere in the program, the program will not
be executed at all.
Now you have all of the instructions required to write simple input-output pro-
grams. Before we finish with ladder diagram basics and go on to inputting the
program into the PC, let's look at logic block instructions (AND LOAD and OR
LOAD), which are sometimes necessary even with simple diagrams.
Logic block instructions do not correspond to specific conditions on the lad-
der diagram; rather, they describe relationships between logic blocks. The
AND LOAD instruction logically ANDs the execution conditions produced by
two logic blocks. The OR LOAD instruction logically ORs the execution con-
ditions produced by two logic blocks.
Section 3-4
Address Instruction
000
LD
001
OUT
Address Instruction
000
LD
001
OUT NOT
Address Instruction
000
LD
001
AND NOT
002
Instruction
003
END(01)
Operands
0000
0100
Operands
0001
0101
Operands
0000
0001
---

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac mini sp16Sysmac mini sp20

Table of Contents