Instruction Conditions - Omron CJ2 CPU - REV 10-2010 User Manual

Cj2 cpu unit software
Table of Contents

Advertisement

Instruction Conditions

Instruction conditions are special conditions related to overall instruction execution 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 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 instruction conditions. These
paired instructions must be in the same task.
Instruction
condition
Interlocked
BREAK(514)
execution
Block program
execution
Flags
In this context, a flag is a bit that serves as an interface between instructions.
Flag
Carry (CY) Flag
Flags for Special
Instructions
CJ2 CPU Unit Software User's Manual
Description
An interlock turns OFF part of the program.
Special conditions, such as turning OFF output
bits, resetting timers, and holding counters are
in effect.
Ends a FOR(512) - NEXT(513) loop during exe-
cution. (Prevents execution of all instructions
until to the NEXT(513) instruction.)
Executes a JMP0(515) to JME0(516) jump.
Executes a program block from BPRG(096) to
BEND(801).
Input flags
Description
The Carry Flag is used as an
unspecified operand in data
shift instructions and addi-
tion/subtraction instructions.
These include teaching flags
for FPD(269) instructions and
network communications
enabled flags.
5 Understanding Programming
Setting instruction
IL(002)
BREAK(514)
JMP0(515)
BPRG(096)
Output flags
Flag
Condition Flags
Condition Flags include the Always
ON/OFF Flags, as well as flags that are
updated by results of instruction execu-
tion. In user programs, these flags can be
specified by labels, such as P_On, P_Off,
P_ER, P_CY, P_EQ rather than by
addresses.
Flags for Special
These include memory card instruction
Instructions
flags and MSG(046) execution com-
pleted flags.
Canceling instruc-
tion
ILC(003)
NEXT(513)
JME0(516)
BEND(801)
Description
5-63
5

Advertisement

Table of Contents
loading

Table of Contents