3. Instructions
150
CS/CJ/NSJ Series Instructions Reference Manual (W474)
UP/DOWN
Applicable Program Areas
Flags
There are no flags affected by UP(521) and DOWN(522).
Function
Hint
• The DIFU(013) and DIFD(014) instructions can also be used for the same purpose, but they require
work bits. UP(521) and DOWN(522) simplify programming by reducing the number of work bits and
program addresses needed.
Precautions
• UP(521) and DOWN(522) are intermediate instructions, i.e., they cannot be used as right-hand
instructions. Be sure to program a right-hand instruction after UP(521) or DOWN(522).
• The operation of UP(521) and DOWN(522) depends on the execution condition for the instruction as
well as the execution condition for the program section when it is programmed in an interlocked
program section, a jumped program section, or a subroutine.
Note Observe the following precaution when using UP(521) in a function block definition.
• The operation of UP(521) and DOWN(522) will not be consistent if the same function block instance
is executed more than once in the same cycle.
• An instance will not be executed while EN is OFF. Caution is thus required when using UP(521) and
DOWN(522) in a function block definition. For details, refer to information on restrictions on using
ladder programming instructions in the CX-Programmer Operation Manual: Function Blocks.
Instruction Mnemonic Variations
Function
code
Function
CONDITION ON UP --- 521
UP(521) turns ON the execution condition for the
next instruction for one cycle when the execution
condition it receives goes from OFF to ON.
CONDITION OFF DOWN --- 522
DOWN(522) turns ON the execution condition for
the next instruction for one cycle when the execu-
tion condition it receives goes from ON to OFF.
Symbol
UP DOWN
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or
transition programs
Usage OK OK OK OK OK OK
z UP
UP(521) is placed between an execution condition and another instruction to turn the execution condition into
an up-differentiated condition. UP(521) causes the connecting instruction to be executed just once when the
execution condition goes from OFF to ON.
z DOWN
DOWN(522) is placed between an execution condition and another instruction to turn the execution condition
into a down-differentiated condition. DOWN(522) causes the connecting instruction to be executed just once
when the execution condition goes from ON to OFF.
UP(521)
DOWN(522)