Omron CJ2 CPU UNIT SOFTWARE User Manual page 201

Cj2 cpu unit software
Hide thumbs Also See for CJ2 CPU UNIT SOFTWARE:
Table of Contents

Advertisement

Carry Flag (P_CY)
The CY Flag is used in shift instructions, addition and subtraction instructions with carry input, addi-
tion and subtraction instruction borrows and carries, as well as with Special I/O Unit instructions,
PID instructions, and FPD instructions. Note the following precautions.
• 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 instruc-
tions, PID instructions, and FPD instructions. Note the following precautions.
• 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 (P_LT, P_GT)
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 exe-
cution results for a certain instruction.
Negative Flag (P_N)
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
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 PLC 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 PLC memory
addresses, the present values for timers are held in memory after the Work Area, and thus for the
following instruction, W500 to W511 will be transferred to D0 to D11 and the present values for T0 to
T7 will be transferred to D12 to D19.
Note Refer to the appendix Memory Map of PLC Memory Addresses for specific PLC memory addresses.
CJ2 CPU Unit Software User's Manual
XFER
&20
Number of words
W500
First source word
D0
First destination word
5 Understanding Programming
W500
Trans-
to
to
ferred
W511
--------
T0
to
to
T7
5
D0
to
to
D11
D12
to
to
D19
5-109

Advertisement

Table of Contents
loading

Table of Contents