Resource limitations
In the PLC Designer, variables are published via the symbol configuration and can thus be exchanged via various interfaces such as OPC UA or also the so-called network variables. Here the variables and the associated types of the symbol configuration are counted in the PLC-Designer. The result is displayed in a compiler log output.
Since an associated PLCopen information model is only generated dynamically in the OPC UA Server, a concrete determination of the required resources is not possible during offline engineering.
The final resources required and any limit exceeded are currently displayed in the controller logbook. Further information about server diagnostics can be found in chapter OPC UA generic server diagnosis.
The hard limiting values refer to the type model of the Lenze OPC UA Server. Exceeding these will result in an error message and a reset of the information model. There is no hard limitation regarding the required number of nodes and references in the instance model of the server. This means that theoretically many instances of a PLC variable type can be published without hitting a hard limit.
However, a distinction must be made here between Struct and FB`s data types in the type model. The address area is created in two stages.
-
In phase 1, all Struct data types and also enumerations are first created in the OPC UA address space.
-
In phase 2 the FB types are created in the OPC UA address range.
If an "out of memory" error occurs in phase 1, this is a serious error as it can result in severe functional restrictions in Data Access. For example, complete access (the complete reading of an entire data structure via a node value attribute) may then no longer be possible. Therefore, if an error occurs in phase 1, we abort the address space creation and delete the previously created address space completely. This results in an error.
If an "Out of Memory" error occurs in phase 2, this is unpleasant but not a serious error, since this normally does not result in any function cuts in the Data Access. Not all FB types can be created, but the missing type information is often not needed in the PLCopen context. Therefore, if an error occurs in phase 2, we abort the address space creation without deleting the previous created address space. This results in a warning.
Remedial action when resource limits are exceeded
-
Only release the variables via the symbol configuration that you need for your use case. Regardless of the resources required, this should be considered for security reasons.
-
Avoid the activation of top-level variables in the symbol configuration and thus an implicit activation of all subordinate variables. Especially the variable budget of the "IOConfigGlobals" quickly reaches the resource limits.
-
Avoid the activation of Functionblocks of the FAST IEC Libraries. Technology Modules and Motion FB´s are internally very complex and have therefore a complex type definition with several needed subtypes of structures. Even if you want to publish a single boolean variable like "xError" from a functionblock, the whole functionblock type definition with all the subtypes is needed in the UA addressspace.
-
For complex PLC applications it is helpful to declare separate variables for OPC UA communication. The advantage is also that it is more manageable for the programmer what should be released for OPC UA communication and not mistakenly internal application variables are accessible via OPC UA.
-
This can be done, for example, via a separate global variable list or via a structure prepared specifically for the use case.
-
In some situations it is also helpful to copy internal application variables to variables to be published within the PLC application. For example, if only one element from an array or an axis data structure is to be published, this can be copied to a separate variable especially for communication. This means that the complete array or axis data structure is not accessible via OPC UA.