Skip to main content

OPC UA Server Configuration Settings

To allow an OPC UA Client to access CODESYS variables, you need to configure the OPC UA Server. This is done in the configuration file CODESYSControl.cfg which is stored in the installation directory of CODESYS in the \GatewayPLC directory.

Example 8. Sample configuration
[CmpOPCUAServer]
NetworkAdapter="eth0"
Table 5.

Key

Default Value

Runtime System (and higher)

Description

MaxNodesPerRead

100

V3.5 SP 17

Defines the number of nodes which are accepted by the corresponding OPC UA service. The OperationLimits of the OPC UA address space are also taken into account. For more details, see the OPC UA specification.

MaxNodesPerHistoryReadData

100

V3.5 SP 17

MaxNodesPerHistoryReadEvents

100

V3.5 SP 17

MaxNodesPerWrite

100

V3.5 SP 17

MaxNodesPerHistoryUpdateData

100

V3.5 SP 17

MaxNodesPerMethodCall

100

V3.5 SP 17

MaxNodesPerBrowse

100

V3.5 SP 17

MaxNodesPerRegisterNodes

100

V3.5 SP 17

MaxNodesPerTranslateBrowsePathsToNodeIds

100

V3.5 SP 17

MaxNodesPerNodeManagement

100

V3.5 SP 17

NetWorkAdapter

V3.5 SP7

Configures the network adapter which should be used by the OPC UA Server.

Example: "eth0", "Ethernet Adapter"

If a configuration does not exist, then all network adapters with a valid IP address are used.

NetworkPort

4840

V3.5 SP7

Configures the port used by the OPC UA Server.

UseLoopback

1

V3.5 SP7 Patch 2

Adds the loopback adapter as an OPC UA endpoint if it is missing in the configuration.

AdapterUpdateRate

5000

V3.5 SP15

Defines the interval in which the OPC UA Server reacts to changed network adapters. Ports are opened or closed depending on whether a network adapter is reconnected or has lost the connection.

ItemMinSamplingRate

100

V3.5 SP15

Defines the minimum sampling rate of the monitored variables (in ms).

NumOfWorkerTasks

-1

V3.5 SP16

Configures the number of worker tasks to be created. The default value -1 generates between 1 and (<number of CPU cores> - 1) worker tasks. The worker tasks are responsible for sampling the monitored variables.

WorkerTasksDynamic

2

V3.5 SP18

Defines whether OPC UA Server worker tasks should be created dynamically depending on the load or statically in order to optimize the start behavior:

  • 0: Static

  • 1: Generate, but pause and resume depending on the load

  • 2: Generate and end depending on the load

SchedulerResolution

1

V3.5 SP17

Configures the resolution of the scheduler of the OPC UA Server (in ms)

SessionsMax

100

V3.5 SP17

Maximum possible number of sessions (only effective if greater than the start size). A session is an online connection of a client.

SecureChannelsMax

50

V3.5 SP19

Maximum number of communication channels supported by the server. Some channels may contain multiple sessions. If the number exceeds the value SOCKET_FDSET_SIZE - <number of open ports>, then not all channels can be used.

ContinuationPointsPerSessionMax

50

V3.5 SP17

Maximum possible continuation points per session. The parameter is required so that the client can subsequently browse for information.

PublishRequestsPerSessionMax

Unlimited

V3.5 SP17

Maximum possible publication requests per session

SubscriptionsPerSessionMax

Unlimited

V3.5 SP17

Maximum possible number of subscriptions per session

PublishNotificationsMax

Unlimited

V3.5 SP17

Maximum number of possible publication messages