6-123
6 Programming
NJ-series CPU Unit Software User’s Manual (W501)
6-7 Namespaces
6
6-7-2 Namespace Specifications
Notation Examples
Notation examples are provided below for creating a function block definition when declaring the
namespaces to use in the function block definition and when not declaring the namespaces.
Examples:
In this example, the Read_recipe and Calculate_upper_limit function block definitions are used in the
algorithm for the Lifter function block definition. Each of these function block definitions is in a different
namespace. In the Lifter function block definition, only the System_C namespace is declared. The fully
qualified name must be given for the Read_recipe function block, which is not in the System_C
namespace. The short name can be given for the Calculate_upper_limit function block, which is in the
System_C namespace.
Restrictions of Declarations
• You can use short names only in the algorithm of a POU definition.
Notation for the Algorithm of the Lifter Function Block
Definition
The following notation is used in the namespace
declaration for the Lifter function block definition.
System_C
System_A
Namespace
Entity
Short name
System_B
System_C
Function block definition
Function block definition
Function block definition
Lifter
Read_recipe
Calculate_upper_limit
\\System_B\Read_recipe
Calculate_upper_limit
• When Namespace Is Not Declared
The System_B namespace of the Read_recipe function
block definition is not declared, so you must give the fully
qualified name.
• When Namespace Is Declared
The System_C namespace of the Calculate_upper_limit
function block definition is declared, so you can give the
short name.