6 Programming
6-120
NJ-series CPU Unit Software User’s Manual (W501)
6-7 Namespaces
This section provides the specifications for namespaces and the procedures to use them. Refer to the
Sysmac Studio Version 1 Operation Manual (Cat. No. W504) for the procedures to manipulate them.
A CPU Unit with unit version 1.01 or later and Sysmac Studio version 1.02 or higher are required
to use namespaces.
Namespaces are a system for grouping function block definitions and other entities to manage them in
nested structures. They are similar to grouping files in folders to manage them in a directory structure. If
you do not use namespaces, the name of each function block definition or other entity must be unique.
If you use namespaces, you can use the same name more than once by setting namespaces. Using
namespaces is not required.
Namespaces provide the following features.
Preventing Duplicated Names
As long as different namespaces are used, you can use the same name for a function block or other
entity more than once. For example, assume that several systems must be programmed, and that a
different programmer will program each of them. Here, it would be likely that the same names would
be used for different function block definitions or other entities. If you did not use namespaces, you
would have to create naming rules to prevent the duplication of names. However, if you set a differ-
ent namespace for each system, programming would be possible without worrying about duplicating
names with other systems.
6-7-1 Namespaces
Features of Namespaces
Programmer for
system A
FB: Read_recipe
All names must be unique, so naming rules must be followed.
Programmer for
system B
Using Namespaces
Namespace: System_A
FB: Read_recipe
Namespace: System_B
Programmer for
system A
FB: Read_recipe
Programmer for
system B
Not Using Namespaces
Namespace: None
FB: System_A_Read_recipe
FB: Read_recipe
Namespace: None
FB: System_B_Read_recipe
The same names can be used.