6 Programming
6-22
NJ-series CPU Unit Software User’s Manual (W501)
Example:
The following table shows when you can use and when you can omit EN and ENO in functions and
function blocks.
6-2-7 Operation That Applies to Both Functions and Function Blocks
Using or Omitting EN and ENO
POU EN ENO
FB User-defined
functions
Cannot be used.
A building error occurs if you try to define
EN in the variable table from the Sysmac
Studio.
Can be used or omitted.
You define ENO as an output variable in
the Sysmac Studio.
Instruction All FB instructions do not use EN. Some instructions use ENO, and others
do not.
FUN User-defined
functions
Required.
When you create a function, the Sysmac
Studio automatically adds EN to the vari-
able table by default.
Can be used or omitted.
You define ENO as an output variable in
the Sysmac Studio.
Instruction All FUN instructions use EN. Some instructions use ENO, and others
do not.
Function
execution
BOOL variable A
BOOL variable B
BOOL variable A
BOOL variable B
Algorithm within function
in
ENO
MyFUN
EN
MyFUN
ENO
in
P_On
You can change ENO with the
algorithm in the function.