6 Programming
6-114
NJ-series CPU Unit Software User’s Manual (W501)
Execution Conditions
All FUN instructions have EN inputs as execution conditions. The FUN instruction is executed each
task period as long as EN is TRUE.
Instruction Options
In a ladder diagram, you can add the following instruction options to specify a change to TRUE or a
change to FALSE as the execution condition for that instruction. ST statements do not have options.
To add an instruction option, add one of the option symbols listed in the table above before the
instruction.
Example:
Condition Flags
System-defined variables that are assigned values that represent the result of instruction processing
are called Condition Flags. The only Condition Flag for an NJ-series Controller is the Carry Flag
(P_CY).
The Carry Flag serves the following purposes.
• It shows whether the result of processing an instruction exceeds the range that can be expressed
by the data type of the output variable.
• It shows whether an overflow occurred in a bit shift instruction for bit string data. For details, refer
to the NJ-series Instructions Reference Manual (Cat. No. W502).
FUN Instructions
Instruction Options Symbol
Differentiation
option
Change to
TRUE
@ This option creates an upwardly differentiated instruc-
tion.
The instruction is executed only once when EN
changes to TRUE.
Information That Applies to Both FB Instructions and FUN
Instructions
@MAX
In1
In2
Out
EN ENO