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.
Sample configuration
[CmpOPCUAServer] NetworkAdapter="eth0"
Key |
Default Value |
Runtime System (and higher) |
Description |
---|---|---|---|
|
100 |
V3.5 SP 17 |
Defines the number of nodes which are accepted by the corresponding OPC UA service.
The |
|
100 |
V3.5 SP 17 |
|
|
100 |
V3.5 SP 17 |
|
|
100 |
V3.5 SP 17 |
|
|
100 |
V3.5 SP 17 |
|
|
100 |
V3.5 SP 17 |
|
|
100 |
V3.5 SP 17 |
|
|
100 |
V3.5 SP 17 |
|
|
100 |
V3.5 SP 17 |
|
|
100 |
V3.5 SP 17 |
|
|
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. |
|
|
4840 |
V3.5 SP7 |
Configures the port used by the OPC UA Server. |
|
1 |
V3.5 SP7 Patch 2 |
Adds the loopback adapter as an OPC UA endpoint if it is missing in the configuration. |
|
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. |
|
100 |
V3.5 SP15 |
Defines the minimum sampling rate of the monitored variables (in ms). |
|
-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. |
|
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:
|
|
1 |
V3.5 SP17 |
Configures the resolution of the scheduler of the OPC UA Server (in ms) |
|
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. |
|
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 |
|
50 |
V3.5 SP17 |
Maximum possible continuation points per session. The parameter is required so that the client can subsequently browse for information. |
|
Unlimited |
V3.5 SP17 |
Maximum possible publication requests per session |
|
Unlimited |
V3.5 SP17 |
Maximum possible number of subscriptions per session |
|
Unlimited |
V3.5 SP17 |
Maximum number of possible publication messages |