→Namespace

Namespaces are used to group →function blocks, →functions and →data types and to be able to clearly refer to these language elements in different contexts. For this purpose, the language elements within a namespace get a unique identifier. But the same identifier can be used for a different language element in different namespaces. Mind that nested namespaces are possible.
When you are using namespaces, the declaration of new language elements will cause none or less name collisions with already existing language elements because the names will still be unique due to the namespaces.

See https://en.wikipedia.org/wiki/Namespace for more background information.

Observe the following distinction:

  • Language elements without an enclosing namespace are members of the global namespace. For instance, all system blocks are members of the global namespace.

  • Language elements declared within a namespace are members of that namespace. The members of the namespace are in the local space of the namespace. In order to use the language elements outside of the namespace, you have to access them.
    The application navigator provides a possibility to create and use objects with namespaces. Details: See "Actions with folders/objects in context with namespaces".
    Moreover, it is possible to specify or manipulate the namespace in the editor of an object.
    Information on the namespaces for the respective language elements can be found under:

    Language

    Starting points for more information

    →ST

    Namespaces in ST

    →FBD

    Namespaces in FBD

    →LD

    Namespaces in LD