6 Programming
6-26
NJ-series CPU Unit Software User’s Manual (W501)
Calling another function or function block from a function or function block that was called from a pro-
gram is called nesting. The limits that are given in the following table apply to the POUs that you can
call from a user-defined function or function block and the number of nesting levels. A building error will
occur if these limits are exceeded.
*1 A CPU Unit with unit version 1.03 or later and Sysmac Studio version 1.04 or higher are required. For other
versions, the limit is 8 levels.
Example 1: From a program, you can call function blocks to a depth of 8 levels. You can then call func-
tions to a depth of 16 levels.
Example 2: From a program, you can call functions to a depth of 16 levels.
Nesting Levels
POU Called POUs Nesting depth
Function blocks Functions and function blocks 8 levels max.
Functions Functions
16 levels max.
*1
Program
FB1
FB1
FB2
Level 1 Level 2
FB8
FUN9
Level 9
FB7
FB8
Level 8
You cannot call a function
block at level 9.
FUN15
FUN16
Level 16
You cannot call a function
at level 17.
Program
FUN1
FUN1
FUN2
Level 1 Level 2
FUN15
FUN16
Level 16
You cannot call a
function at level 17.