Omron SYSMAC CS Series Programming Manual page 76

Hide thumbs Also See for SYSMAC CS Series:
Table of Contents

Advertisement

Precautions
56
Refer to the descriptions of individual instructions in the CS/CJ-series Pro-
grammable Controllers Programming Manual (W340) for the conditions that
will cause the ER Flag to turn ON. Caution is required because some instruc-
tions will turn OFF the ER Flag regardless of conditions.
Note The PC Setup Settings for when an instruction error occurs determines
whether operation will stop when the ER Flag turns ON. In the default setting,
operation will continue when the ER Flag turns ON. If Stop Operation is spec-
ified when the ER Flag turns ON and operation stops (treated as a program
error), the program address at the point where operation stopped will be
stored at in A298 to A299. At the same time, A29508 will turn ON.
Equals Flag
The Equals Flag is a temporary flag for all instructions except when compari-
son results are equal (=). It is set automatically by the system, and it will
change. The Equals Flag can be turned OFF (ON) by an instruction after a
previous instruction has turned it ON (OFF). The Equals Flag will turn ON, for
example, when MOV or another move instruction moves 0000 Hex as source
data and will be OFF at all other times. Even if an instruction turns the Equals
Flag ON, the move instruction will execute immediately and the Equals Flag
will turn ON or OFF depending on whether the source data for the move
instruction is 0000 Hex or not.
Carry Flag
The CY Flag is used in shift instructions, addition and subtraction instructions
with carry input, addition and subtraction instruction borrows and carries, as
well as with Special I/O Unit instructions, PID instructions, and FPD instruc-
tions. Note the following precautions.
Note
1. The CY Flag can remain ON (OFF) because of execution results for a cer-
tain instruction and then be used in other instruction (an addition and sub-
traction instruction with carry or a shift instruction). Be sure to clear the
Carry Flag when necessary.
2. The CY Flag can be turned ON (OFF) by the execution results for a certain
instruction and be turned OFF (ON) by another instruction. Be sure the
proper results are reflected in the Carry Flag when using it.
Less Than and Greater Than Flags
The < and > Flags are used in comparison instruction, as well as in the LMT,
BAND, ZONE, PID and other instructions.
The < or > Flag can be turned OFF (ON) by another instruction even if it is
turned ON (OFF) by execution results for a certain instruction.
Negative Flag
The N Flag is turned OFF when the leftmost bit of the instruction execution
results word is "1" for certain instructions and it is turned OFF unconditionally
for other instruction.
Specifying Operands for Multiple Words
With the CS/CJ-series PCs, an instruction will be executed as written even if
an operand requiring multiple words is specified so that all of the words for the
operand are not in the same area. In this case, words will be taken in order of
the PC memory addresses. The Error Flag will not turn ON.
As an example, consider the results of executing a block transfer with
XFER(070) if 20 words are specified for transfer beginning with W500. Here,
the Work Area, which ends at W511, will be exceeded, but the instruction will
be executed without turning ON the Error Flag. In the PC memory addresses,
Section 2-2

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cs1g/h-cpu-ev1 seriesCj1g-cpu seriesSysmac cj series

Table of Contents