Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 38

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Programming Concepts
Instruction Conditions
Instruction
condition
Interlocked
An interlock turns OFF part of the program. Special conditions, such as
turning OFF output bits, resetting timers, and holding counters are in
effect.
BREAK(514)
Ends a FOR(512) - NEXT(513) loop during execution. (Prevents execu-
execution
tion of all instructions until to the NEXT(513) instruction.)
Executes a JMP0(515) to JME0(516) jump.
Block program
Executes a program block from BPRG(096) to BEND(801).
execution
Flags
Input flags
• Differentiation Flags
Differentiation result flags. The status of these flags
are input automatically to the instruction for all dif-
ferentiated up/down output instructions and the
DIFU(013)/DIFD(014) instructions.
• Carry (CY) Flag
The Carry Flag is used as an unspecified operand
in data shift instructions and addition/subtraction
instructions.
• Flags for Special Instructions
These include teaching flags for FPD(269) instruc-
tions and network communications enabled flags
Operands
Output Instructions
Output instructions execute all functions, using the power flow as an execution
condition.
LD power flow
Input block
Instruction conditions are special conditions related to overall instruction exe-
cution that are output by the following instructions. Instruction conditions have
a higher priority than power flow (P.F.) when it comes to deciding whether or
not to execute an instruction. An instruction may become not be executed or
may act differently depending on instruction conditions. Instruction conditions
are reset (canceled) at the start of each task, i.e., they are reset when the task
changes.
The following instructions are used in pairs to set and cancel certain instruc-
tion conditions. These paired instructions must be in the same task.
Description
In this context, a flag is a bit that serves as an interface between instructions.
• Differentiation Flags
Differentiation result flags. The status of these flags are output
automatically from the instruction for all differentiated up/down
output instructions and the UP(521)/DOWN(522) instruction.
• Condition Flags
Condition Flags include the Always ON/OFF Flags, as well as
flags that are updated by results of instruction execution. In user
programs, these flags can be specified by labels, such as ER, CY,
>, =, A1, A0, rather than by addresses.
• Flags for Special Instructions
These include MSG(046) execution completed flags.
Operands specify preset instruction parameters (boxes in ladder diagrams)
that are used to specify I/O memory area contents or constants. An instruction
can be executed entering an address or constant as the operands. Operands
are classified as source, destination, or number operands.
Example
#0
D0
Power flow for
output instruction
Output block
Output flags
S (source)
D (destination)
Section 1-1
Setting
Canceling
instruction
instruction
IL(002)
ILC(003)
BREAK(514)
NEXT(513)
JMP0(515)
JME0(516)
BPRG(096)
BEND(801)
N (number)
5

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents