EasyManua.ls Logo

Omron CJ - 08-2008 - Condition Flags

Omron CJ - 08-2008
733 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
436
Condition Flags Section 9-20
9-20 Condition Flags
These flags include the Arithmetic Flags such as the Error Flag and Equals
Flag which indicate the results of instruction execution. In earlier PLCs, these
flags were in the SR Area.
The Condition Flags are specified with labels, such as CY and ER, or with
symbols, such as P_Carry and P_Instr_Error, rather than addresses. The sta-
tus of these flags reflects the results of instruction execution, but the flags are
read-only; they cannot be written directly from instructions or Programming
Devices (CX-Programmer or Programming Console).
Note The CX-Programmer treats condition flags as global symbols beginning with
P_.
All Condition Flags are cleared when the program switches tasks, so the sta-
tus of the ER and AER flags are maintained only in the task in which the error
occurred.
The Condition Flags cannot be force-set and force-reset.
Summary of the Condition
Flags
The following table summarizes the functions of the Condition Flags, although
the functions of these flags will vary slightly from instruction to instruction.
Refer to the description of the instruction for complete details on the operation
of the Condition Flags for a particular instruction.
Name Symbol Label Function
Error Flag P_ER ER Turned ON when the operand data in an instruction is incorrect (an
instruction processing error) to indicate that an instruction ended
because of an error.
When the PLC Setup is set to stop operation for an instruction error
(Instruction Error Operation), program execution will be stopped and
the Instruction Processing Error Flag (A29508) will be turned ON
when the Error Flag is turned ON.
Access Error Flag P_AER AER Turned ON when an Illegal Access Error occurs. The Illegal Access
Error indicates that an instruction attempted to access an area of
memory that should not be accessed.
When the PLC Setup is set to stop operation for an instruction error
(Instruction Error Operation), program execution will be stopped and
the Instruction Processing Error Flag (A429510) will be turned ON
when the Access Error Flag is turned ON.
Carry Flag P_CY CY Turned ON when there is a carry in the result of an arithmetic opera-
tion or a “1” is shifted to the Carry Flag by a Data Shift instruction.
The Carry Flag is part of the result of some Data Shift and Symbol
Math instructions.
Greater Than Flag P_GT > Turned ON when the first operand of a Comparison Instruction is
greater than the second or a value exceeds a specified range.
Equals Flag P_EQ = Turned ON when the two operands of a Comparison Instruction are
equal the result of a calculation is 0.
Less Than Flag P_LT < Turned ON when the first operand of a Comparison Instruction is less
than the second or a value is below a specified range.
Negative Flag P_N N Turned ON when the most significant bit (sign bit) of a result is ON.
Overflow Flag P_OF OF Turned ON when the result of calculation overflows the capacity of the
result word(s).
Underflow Flag P_UF UF Turned ON when the result of calculation underflows the capacity of
the result word(s).
Greater Than or
Equals Flag
P_GE >= Turned ON when the first operand of a Comparison Instruction is
greater than or equal to the second.
Not Equal Flag P_NE < > Turned ON when the two operands of a Comparison Instruction are
not equal.

Table of Contents

Related product manuals