...
The OPC UA protocol is the next generation of the OPC standard, which provides a cohesive, secure, and reliable platform-independent framework for access to the real-time data. The main difference in comparison with the previous versions is that the interprocess communication uses TCP/IP communication instead of COM/DCOM technology and therefore is OS (Windows) independent. This protocol supports two methods of data encoding (binary and XML). The existing OPC client implementation supports only binary encoding.
...
Kotva | ||||
---|---|---|---|---|
|
Kotva | ||||
---|---|---|---|---|
|
...
When initiating the communication, the client exchanges multiple messages with the server. In the case of binary encoding, "Hello Message" isthe first message sent from the client to the server. The message defines the size of receiving and sending buffers and the maximum size of messages that may be exchanged during TCP communication between client and server. It also defines the URL address of the endpoint. The server answers by sending an "Acknowledge message", in which it confirms the suggested parameters or modifies them according to its their limits.
The next message sent by the client is "OpenSecureChannel message". It is used to establish a communication channel to exchange data. In this message, the client and server agree on what type of encrypting and signing mode will be used (either "sign and encrypt" or "encrypt" only). OPCUA client in the D2000 System supports only unencrypted mode.
...
After activating the session, all types of messages that are intended for object management in the address space of the OPC UA server can be swapped. In this step, the client creates a subscription with the parameters set on the communication station level for all stations within the communication line.
The monitored items should be then inserted into these subscriptions. They correspond with the instances of I/O tags, which contain the parameters defined in the address dialog window.
From this moment, the server informs the client about the changes in the monitored objects by
Kotva | ||||
---|---|---|---|---|
|
...
- Simatic S-7 OPC UA Server
- Bernecker PLC embedded OPC UA Server
- Zenon OPC UA Server
...
Forced disconnection: If all stations on the line are in the simulation mode or the communication is stopped for them, the line will be disconnected (the communication socket will be closed). If the simulation is disabled for at least one station and the communication is not stopped for it (the Parameters tab of the Station type object), the line will be connected again.
Kotva | ||||
---|---|---|---|---|
|
...
Communication line category: OPC UA Client
Host address: OPC UA server address. You may set the name according to UNC convention (e.g. "\\server" or "server", DNS names (e.g. "domain.com", "example.
...
Communication line category: OPC UA Client
Host address: OPC UA server address. You may set the name according to UNC convention (e.g. "\\server" or "server", DNS names (e.g. "domain.com", "example.company.com") or IP address ("196.54.23.113"). In the case of redundant systems, multiple names/addresses separated by commas or semicolons can be entered.
TCP The usage of the alternative path (the second or following name/address) is signalized by the FLB flag and a combination of FLN, FLO, FLP flags in the station value.
TCP port: TCP port of OPC UA server (e.g. 4840).
EndpointUrl: Endpoint address (e.g. opc.tcp://localhost:4840)
Encoding type: Type of encoding that is used for data exchange (currently only Binary encoding is supported).Note: when using the Client Type=Secure setting, neither Host address nor TCP port is used directly. However, if the string #HOST# is used within the EndpointUrl, it will be replaced by the IP addresses/names specified in the Host address parameter. This is useful when configuring a connection to a redundant OPC server that has multiple IP addresses/names.
Encoding type: Type of encoding that is used for data exchange (currently only Binary encoding is supported).
Kotva | ||||
---|---|---|---|---|
|
...
Parameter name | Meaning | Unit | Default value | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Type of used client (driver for OPC UA communication):
| Default Secure | Default | ||||||||||||||||||||||||
| Session text identifier. The Session identifier should be unique within the client instance, making it possible to search problems faster in the client or server logs. | String | Kom process | ||||||||||||||||||||||||
| The channel must be reopened before this time limit elapses. If the time is exceeded, the channel will be closed and unable to change data. | hh:mm:ss | 01:00:00 | ||||||||||||||||||||||||
| Any message should be changed between client and server before this time limit elapses. If it is not sent, the sources within the session that are kept on the server are released. The primary work of this parameter is to remove the sessions that became inactive because of some unexpected reason. | mm:ss | 01:00 | ||||||||||||||||||||||||
| Type of authentication used with the OPC UA server. Supported types are:
| Anonymous / Username | Anonymous | ||||||||||||||||||||||||
| If Authentication type = Username, then the user name used in the authentication. If Authentication type = Certificate, then the path to the user certificate (e.g. D:\user_cert.der). | ||||||||||||||||||||||||||
| If Authentication type = Username, then the password used in the authentication. If Authentication type = Certificate, then the path to the user private key (e.g. D:\user_private_key.pem). | ||||||||||||||||||||||||||
| Security policy (only for Client Type = Secure; for Client Type = Default a security policy None is used):
| None Basic128Rsa15 Basic256 Basic256Sha256 Aes128Sha256RsaOaep Aes256Sha256RsaPss | None | ||||||||||||||||||||||||
| A mode of message security in OPC UA communication (only for Client Type = Secure; for Client Type = Default a mode of message security None is used):
| None Sign Sign & Encrypt | None | ||||||||||||||||||||||||
| rcd
| rcd | Reconnect DelayWaiting after the connection is broken before the connection is re-established. | mm:ss.mss | 00:10.000 | ||||||||||||||||||||||
Kotva | ecd | ecd | Error Connect DelayWaiting after an unsuccessful connection attempt. | mm:ss.mss | 00:02.000 | ||||||||||||||||||||||
Kotva | dm | dm | Debug ModeIt changes the number of information about communication. We recommend enabling the Extended/Full modes only when detecting the problems and debugging the communication. The "Full + Trace (Secure only)" mode is valid only for Client Type = Secure. | Normal/Extended/Full/ Full + Trace (Secure only) | Normal | ||||||||||||||||||||||
Kotva | dt | dt | Debug ThreadsThe parameter defines the thread(s) that will send the debug info about the communication. | Receiving/Sending/Others treads/All threads | All threads |
Note: all X509 certificates used in OPC UA communication can be found in the following subdirectories of the kom-opcua directory in the application directory:
- own - a directory with KOM process's own certificate (file cert.der). If this file does not exist, it is generated
Warning - this automatically generated certificate will only be valid for 1 year, so we recommend replacing it with a certificate valid for a longer period! - private - a directory with a private key for the KOM process own certificate (file private.pem)
- rejected - a directory with rejected certificates
- trusted - a directory with trusted certificates (the first time a connection is established to an OPC UA server, its certificate is stored in this directory)
...
The parameters on the level of the communication station correspond with the setting of one subscription. It means the one communication station is equivalent to one instance of a subscription within the session.
...
Defines the time interval for the server to send the information about the change of monitored items within the instance subscription by "Publish message".
Note: This parameter defines a proposed value that the OPC UA server can change, e.g. Bernecker-Rainer always returned a value of "Publishing Interval" at least 50 ms, although the requested interval was smaller.
...
If the client does not send the request for data till the time defined by (LifeTime Count * Publishing Interval), the subscription expires. The value should be minimally 3 times higher than the "Requested Max KeepAlive Count".
Note: This parameter defines a proposed value that the OPC UA server can change, e.g. Bernecker-Rainer always returned as a value of "LifeTime Count" a maximum of 600, although the requested value was greater.
...
If the objects of subscription are not changed, the server will send a keep-alive message after elapsing the time (Max Notifications Per Publish * Publishing Interval). The client will confirm this message when it sends a new request for data.
Note: This parameter defines a proposed value that the OPC UA server can change, e.g. Bernecker-Rainer has always returned as a value of "Max KeepAlive Count" a maximum of 200, although the requested value was greater.
...
Timestamps used while reading a value:
- None - timestamp received from OPC server is not used (value will be timestamped by the current time)
- Source - SourceTimestamp is used
- Server - ServerTimestamp is used (default)
...
Timestamps used to write a value:
- None - no timestamp is set
- Source - SourceTimestamp is set (equal to the timestamp of written value)
- Server - ServerTimestamp is set (equal to current time)
- Both - both SourceTimestamp and ServerTimestamp are set
Note: If the OPC server does not support the writing of timestamps, according to the standard it should return the Bad_WriteNotSupported (2155020288) error code.
...
| Identifier of preferred Security Policy (only for Client Type = Default for password encryption). If the OPC UA offers several security policies, it is possible to select a specific one according to the identifier sent by the OPC server (the identifier can be found in the logs). Examples of an identifier (text form is in parentheses): PolicyId: 30 (0) PolicyId: 31 (1) PolicyId: 75 73 65 72 6E 61 6D 65 5F 62 61 73 69 63 31 32 38 52 73 61 31 35 (username_basic128Rsa15) PolicyId: 75 73 65 72 6E 61 6D 65 5F 62 61 73 69 63 32 35 36 53 68 61 32 35 36 (username_basic256Sha256) | - | - | ||||||
| Waiting after the connection is broken before the connection is re-established. | mm:ss.mss | 00:10.000 | ||||||
| Waiting after an unsuccessful connection attempt. | mm:ss.mss | 00:02.000 | ||||||
| Waiting after an unsuccessful attempt to create monitored items. If it is zero, the attempt is not repeated. If it is non-zero, the attempt is repeated after the defined wait. | sec | 0 | ||||||
| Terminating the connection after receiving a ServiceFault. | YES/NO | NO | ||||||
| It changes the number of information about communication. We recommend enabling the Extended/Full modes only when detecting the problems and debugging the communication. The "Full + Trace (Secure only)" mode is valid only for Client Type = Secure. | Normal/Extended/Full/ Full + Trace (Secure only) | Normal | ||||||
| The parameter defines the thread(s) that will send the debug info about the communication. | Receiving/Sending/Others treads/All threads | All threads |
Note: all X509 certificates used in OPC UA communication can be found in the following subdirectories of the kom-opcua directory in the application directory:
- own - a directory with the KOM process's own certificate (file cert.der). If this file does not exist, it is generated
Warning - this automatically generated certificate will only be valid for 1 year, so we recommend replacing it with a certificate valid for a longer period! - private - a directory with a private key for the KOM process own certificate (file private.pem)
- rejected - a directory with rejected certificates
- trusted - a directory with trusted certificates (the first time a connection is established to an OPC UA server, its certificate is stored in this directory)
Kotva | ||||
---|---|---|---|---|
|
...
The parameters on the level of the communication station correspond with the setting of one subscription. It means that one communication station is equivalent to one instance of a subscription within the session.
Full name | Description | Unit | Default value | ||||||
---|---|---|---|---|---|---|---|---|---|
| Defines the time interval for the server to send the information about the change of monitored items within the instance subscription by "Publish message". | mi:ss.mss | 00:05.000 | ||||||
| If the client does not send the request for data by the time defined by (LifeTime Count * Publishing Interval), the subscription expires. The value should be minimally 3 times higher than the "Requested Max KeepAlive Count". | Number | 1000 | ||||||
| If the objects of the subscription are not changed, the server will send a keep-alive message after elapsing the time (Max Notifications Per Publish * Publishing Interval). The client will confirm this message when it sends a new request for data. | Number | 5 | ||||||
| The parameter defines the maximum number of notifications about the object change, which the server can send in one "Publish message". Zero indicates that the number of notifications is unlimited. | Number | 0 | ||||||
| The parameter enables/disables the publishing within the subscription. | YES/NO | YES | ||||||
| It defines the relative priority of a subscription. If the server should send more notifications, the subscription with higher priority is preferred. | 0-255 | 0 | ||||||
| This parameter enables creating an object queue with the defined length on the OPC UA server's side for each monitored item in a subscription. | Number | 0 | ||||||
| When the queue is full, the oldest values will be discarded (YES) or the newest values will be replaced (NO). | YES/NO | YES | ||||||
| Timestamps used while reading a value:
| - | Server | ||||||
| Timestamps used to write a value:
Note: If the OPC server does not support the writing of timestamps, according to the standard it should return the Bad_WriteNotSupported (2155020288) error code. | - | None | ||||||
| StatusCode item will be used when writing. Note: According to the standard, the OPC UA Wrapper returns the Bad_WriteNotSupported (2155020288) error code if the StatusCode entry is used when writing to the OPC DA Server version 2.05a. | YES/NO | YES | ||||||
| When an item of an array is written, the entire array is read first and then written. If this parameter is set to NO, only a specific array item is written, Note: According to the standard, if the OPC server does not support writing a specific array item, it should return the Bad_WriteNotSupported (2155020288) error code. Note: If this parameter is active, the "Write only" parameter must not be set at the I/O tag which addresses an item of the array. | YES/NO | NO | ||||||
| Values that are not older than the specified time interval (compared to the timestamp of the current value of the I/O tag) will be accepted. After writing, it may happen that the value read back is older (usually by several ms) compared to the time of writing unless the communication computer and the OPC UA server have exact time synchronization. Error messages may appear in the line log: | hh:mi:ss | 00:00:00 | ||||||
| A way of reading values:
Note: The Subscribe+Read and Read modes should only be used if there is a problem with standard communication, as they are less efficient and have a higher overhead. | Subscribe Subscribe+Read Read | Subscribe | ||||||
| Ignoring filter parameters in the I/O tag configuration (Sampling type, DeadBand type, Trigger type). | YES/NO | NO | ||||||
| The maximum number of consecutive unconfirmed Publish requests (to which the OPC UA server does not reply with a Publish Message), after which the connection will be closed. A value of 0 causes the connection to not be closed. Note: This parameter can be used to speed up the detection of a broken connection to the OPC UA server. | - | 0 |
Kotva | ||||
---|---|---|---|---|
|
...
I/O tag configuration dialog window is used for setting the monitored objects.
Object address setting
Name | Meaning | Unit | Default value | ||||||
---|---|---|---|---|---|---|---|---|---|
ID | The identifier in text format, which is, depending on the ID type, converted to the required native type. Note: if an identifier %IGNORE is specified for ID type=String, the I/O tag is ignored. | String | |||||||
ID type | Enumerated types of identifiers. They help to access the objects in the OPC UA address space. Numeric-1B ID: Identifier limited to 1-byte value (0-255) Numeric-2B ID: Identifier limited to 2-byte value (0-65535) Numeric-4B ID: 4-byte identifier String: Text identifier Guid -16B ID: 16-byte (128-bit) number that is usually divided into four parts. For example 3F2504E0-4F89-11D3-9A0C-0305E82C3301. ByteString: Identifier that is represented as a sequence of bytes. | Numeric-1B ID / Numeric-2B ID/ Numeric-4B ID/String/Guid -16B ID/ByteString | Undefined | ||||||
Namespace
| Numerical identifier of the namespace of the OPC UA server. Each OPC UA server can have N namespaces. However, the object identifier must be unique in one namespace. | Numeric | |||||||
Variable type | The value type of objects that can be processed by the OPC UA client. Variable type should be used only if the I/O tag is intended for writing. As regards the reading of the object value, the information about type is sent together with the value. | Undefined / Boolean / Byte / SByte / Integer16 / Unsigned16 / Integer32 / Unsigned32 / Integer64 / Unsigned64 / Float / Double / String / UTC Time / Boolean array / Byte array / SByte array / Integer16 array / Unsigned16 array / Integer32 array / Unsigned32 array / Integer64 array / Unsigned64 array / Float array / Double array / String array / UTC Time array / LocalizedText / LocalizedText array | Undefined | ||||||
Array index | If the object value is represented as a value array ( |
...
A way of reading values:
- Subscribe: communication via subscriptions and notifications (standard)
- Subscribe + Read: like Subscribe, in addition periodic Read requests are sent (according to the time parameters of the station)
- Read: send Read requests only
Note: The Subscribe+Read and Read modes should only be used if there is a problem with standard communication, as they are less efficient and have a higher overhead.
...
I/O tag configuration dialog window is used for setting the monitored objects.
Object address setting
Name | Meaning | Unit | Default value | ID | The identifier in text format, which is, in dependence on ID type, converted to the required native type. Note: if an identifier %IGNORE is specified for ID type=String, the I/O tag is ignored. | String | |||||
---|---|---|---|---|---|---|---|---|---|---|---|
ID type | Enumerated types of identifiers. They help to access the objects in OPC UA address space. Numeric-1B ID: Identifier limited to 1-byte value (0-255) Numeric-2B ID: Identifier limited to 2-byte value (0-65535) Numeric-4B ID: 4-byte identifier String: Text identifier Guid -16B ID: 16-byte (128-bit) number that is usually divided into four parts. For example 3F2504E0-4F89-11D3-9A0C-0305E82C3301. ByteString: Identifier that is represented as a sequence of bytes. | Numeric-1B ID / Numeric-2B ID/ Numeric-4B ID/String/Guid -16B ID/ByteString | Undefined | ||||||||
Kotva | namespace_index | namespace_index | Numerical identifier of the namespace of OPC UA server. Each OPC UA server can have N namespaces. However, the object identifier must be unique in one namespace. | Numeric | Variable type | The value type of objects that can be processed by OPC UA client. Variable type should be used only if the I/O tag is intended for writing. As regards the reading of the object value, the information about type is sent together with the value. | Undefined / Boolean / Byte / SByte / Integer16 / Unsigned16 / Integer32 / Unsigned32 / Integer64 / Unsigned64 / Float / Double / String / UTC Time / Boolean array / Byte array / SByte array / Integer16 array / Unsigned16 array / Integer32 array / Unsigned32 array / Integer64 array / Unsigned64 array / Float array / Double array / String array / UTC Time array / LocalizedText / LocalizedText array | Undefined | Array index | ), the parameter defines its range or value of a particular item. The first element of an array is identified by index 0. A text representation of an array index may be in several formats:
A text representation of array index may be in several formats:
Note: Writing is only supported for I/O tags with a specific index, not for ranges. | String |
Write only | It controls if the I/O tag is a part of the subscription. Its value will be sent periodically from the server in "Publish message". | Unchecked/checked | Unchecked | ||||||||
Expanded Node ID | If it is checked, it enables addressing the ExpandedNodeId. Unlike the classic identifier in the OPC UA address space, ExpandedNodeId is supplemented by NameSpace URI and Server index. Note: ExpandedNodeId is not yet supported in the KOM process. | Unchecked/checked | Unchecked | NamespaceUri | Text identifier of the namespace of the OPC UA server that is used instead of the numerical representation of a namespace. | String | |||||
ServerIndex | A numerical identifier that addresses the server number when using the ExpandedNodeID identifier. | Numeric | 0 |
Settings of other parameters
...
Note: Writing is only supported for I/O tags with a specific index, not for ranges. | String | ||
Write only | It controls if the I/O tag is a part of the subscription. Its value will be sent periodically from the server in the "Publish message". | Unchecked/checked | Unchecked |
Expanded Node ID | If it is checked, it enables addressing the ExpandedNodeId. Unlike the classic identifier in the OPC UA address space, ExpandedNodeId is supplemented by NameSpace URI and Server index. Note: ExpandedNodeId is not yet supported in the KOM process. | Unchecked/checked | Unchecked |
NamespaceUri | Text identifier of the namespace of the OPC UA server that is used instead of the numerical representation of a namespace. | String | |
ServerIndex | A numerical identifier that addresses the server number when using the ExpandedNodeID identifier. | Numeric | 0 |
Kotva | ||||
---|---|---|---|---|
|
Name | Meaning | Unit | Default value |
---|---|---|---|
Sampling type | The parameter defines the sampling frequency of the monitored objects. When using the "Publishing rate", the frequency is equivalent to the Requested Publishing Interval, which is set on the communication station level. "Practical fastest rate" sets the sampling frequency on the maximum value. "Custom rate" enables the specification of a custom sampling interval, which may be defined in "Sampling Time". | Publishing rate/Practical fastest rate/Custom rate | Publishing rate |
Sampling time | The parameter allows you to set the custom sampling frequency if "Sampling type" is "Custom rate". | ss.ms | 0.0 |
DeadBand type | Deadband is a band in which the change of value does not cause a Data Change Notification, which is part of Publish Message. When using "None", this band is ignored. Otherwise, there is used the relative or absolute value ("Percent"/"Absolute") from the "DeadBand value". | None/Absolute/Percent | None |
DeadBand value | The parameter defines the custom value of a deadband if you chose the relative/absolute value ("Percent"/"Absolute"). | 0.0 | |
Trigger type | The parameter specifies the condition that causes Data Change Notification. When using "Status", only the status change is reported. Change of value and timestamp are ignored. When using "Status,Value", the change of timestamp is ignored. "Status,Value,Timestamp" ensures the reporting in all options, i.e. when changing the status, value, or timestamp. Note: a specific Simatic S7-1500 did not send value changes if this parameter was set to default "Status, Value, Timestamp" - changing it to "Status, Value" helped. | Status/Status,Value/Status,Value,Timestamp | Status,Value,Timestamp |
Kotva | ||||
---|---|---|---|---|
|
...
This dialog window is intended for browsing and inserting the OPC UA objects into the address parameter of the I/O tag. The upper part contains the tree structure of the address space. When clicking on the object, the lower part of the window displays the direct descendants of the object (variables, tags).
Double click on one of the descendants transfers the address parameters of an object to the address dialog window of the I/O tag.
Note: Using Ctrl+C it is possible to copy a list of displayed descendants into the Windows clipboard. All descendants will be copied unless a specific descendant is selected.
Note: In versions from 17th December 2018 and newer, the recycling of browser dialog has been implemented. If the dialog is closed by the Close button or after selecting a tag, it is actually only hidden and it is available for browsing by another I/O tag within the same station so that the tree structure of the browsed objects is preserved. Clicking on the close icon at the top right corner will cause the dialog to be really closed.
The "Copy tags" button or a keyboard shortcut Ctrl+C copies the names of tags in a selected branch into the Windows clipboard. All tags will be copied unless a specific tag is selected.
The "Copy tree" button or a keyboard shortcut Ctrl+Shift+C copies the names of tags and their addresses in all browsed branches into the Windows clipboard.
Checking the "Show all types" option causes that in addition to objects (nodes of Object type), all other types of nodes (nodes of type Unspecified, Method, ObjectType, VariableType, ReferenceType, DataType, View) are displayed in the tree structure, with the exception of tags (nodes of type Variable). To display tags, see the next option.
...
This dialog window is intended for browsing and inserting the OPC UA objects into the address parameter of the I/O tag. The upper part contains the tree structure of the address space. When clicking on the object, the lower part of the window displays the direct descendants of the object (variables, tags).
Double click on one of the descendants transfers the address parameters of an object to the address dialog window of the I/O tag.
Note: Using Ctrl+C it is possible to copy a list of displayed descendants into the Windows clipboard. All descendants will be copied unless a specific descendant is selected.
Note: In versions from 17th December 2018 and newer, the recycling of browser dialog has been implemented. If the dialog is closed by the Close button or after selecting a tag, it is actually only hidden and it is available for browsing by another I/O tag within the same station so that the tree structure of the browsed objects is preserved. Clicking on the close icon at the top right corner will cause the dialog to be really closed.
Checking the "Structured tags" option causes the variables (tags- tags (nodes of Variable type) to appear in the tree structure in addition to the objectsobjects (nodes of Object type), and the KOM process also attempts to read their descendants. This is useful for browsing OPC UA servers that support structured tags. You can also insert a tag into the address the address dialog window of the I/O tag by tag by double-clicking the tag name in the tree structure.
Kotva | ||||
---|---|---|---|---|
|
...
Command | Syntax | Meaning | STWATCH | STWATCH StationName | Syntax | Meaning | |
---|---|---|---|---|---|---|---|
STWATCH | STWATCH StationName | The command sends commands for the reading of values of all configured I/O tag | |||||
LNALTERPATH | LNALTERPATH LineName QUERY LNALTERPATH LineName 1|2|3|4 | The command finds out which of the IP addresses configured on the line (1..4) the D2000 KOM process is connected to. The command breaks the current connection and connects to the IP address whose order is in the command (1..4). | Tell command sends commands for the reading of values of all configured I/O tag
Kotva | ||||
---|---|---|---|---|
|
...
- Ver. 1.0 – May 10, 2012
- Ver. 1.1 - December 17, 2018: Added browser dialog recycling and browsing of structured tags
- Ver. 1.2 - April 4, 2024: Added support for browsing all tag types
Info | ||
---|---|---|
| ||
...