Register a unique library namespace (Required)
A worldwide unique sequence of Latin letters.
As short as possible!
For example "LAT" for a library to handle lists and trees.
Drop a line in the registry (libregistry@codesys.com).
A group of some capital letters forms the namespace identifier formerly known as the Prefix of the library. There are two possible ways of how prefixes can be placed in front of the symbol. They can either be separated from the symbol by an underscore (e.g. MBM_GetBlock) or by nothing at all (e.g. SysFileClose). Contrary to the prefix the namespace and the symbol are always separated by a full stop.
Example: The library FBFactory contains the Function Block FBFactoryBase. There you can find the following line: _hPool : CAA.HANDLE; CAA is the namespace of the library CAATypes. Because of the namespace there can not be any confusion in case of having the same symbols in different libraries.
The namespace may not equate a reserved symbol of the IEC standard. So, for example the following namespaces are not allowed: COS, DT, ABS, etc.
The namespace must be worldwide unique and it must be stored in the library namespace registry.
Marking the library with the Property:: LanguageModelAttribute(Text) := 'qualified-access-only' effects that the symbols of the library are only accessible via the namespace.
Has to be registered at the 3S Registry for Library Namespaces: libregistry@codesys.com
Every delivery of CODESYS includes the current version of the so called Library Registry (LibraryRegistry.chm) file.
Inside this you will find the currently registered namespaces or library prefixes.
The namespace must not equate the name of a datatype (FB, PRG, FUNC, ALIAS, ENUM, STRUCT,…) already defined in another library. For example it will cause problems, if the namespace "TICK" is used for a library "SysTick.library", while the name "TICK" is already used for an ALIAS data type within the library "SysTypes.library" also included in the same project. If these rules are not regarded, compiler errors will result in case the other rules for the usage of namespaces as described in the current guidelines are followed. For example it will not be possible to compile the following: tkCurrent := TICK.GetCurrent(); An compile error message will result, telling you that for data type "TICK" no component with name "GetCurrent" is defined.