270
Programming Appendix A
The following instructions are used in pairs to set and cancel certain instruction conditions. Each pair of
instructions must be in the same task.
Flags
In this context, a flag is a bit that serves as an interface between instructions.
Operands
Operands specify preset instruction parameters (boxes in ladder diagrams) that are used to specify I/O mem-
ory area contents or constants. An instruction can be executed by entering an address or constant as the oper-
ands. Operands are classified as source, destination, or number operands.
Note Operands are also called the first operand, second operand, and so on, starting from the top of the
instruction.
Instruction
condition
Description Setting
instruction
Canceling
instruction
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.
IL(002) ILC(003)
Block program
execution
A program block from BPRG(096) to BEND(801) is executed. BPRG(096) BEND(801)
Input flags Output 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.
• 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.
MOV
#0000
D00000
JMP
3
Example
S (source)
D (destination)
N (number)
Operand types Operand
symbol
Description
Source Specifies the address of the data
to be read or a constant.
S Source operand Source operand other than control
data (C)
C Control data Compound data in a source oper-
and that has different meanings
depending bit status.
Destination
(Results)
Specifies the address where data
will be written.
D ---
Number Specifies a particular number used
in the instruction, such as a jump
number or subroutine number.
N ---
MOV
#0000
D00000
First operand
Second operand