Yes, an example of this including a bootstrapper is available on GitHub: OPC UA .NET Samples - PowerShell Client
NuGet stores all installed NuGet packages either next to the Visual Studio Solution in the “packages” folder (in case of non-SDK style projects) or in the local NuGet cache (in case of SDK style projects). To be able to update to the official version, the preview packages must be deleted from your own NuGet source and the local NuGet cache. Where the local NuGet cache is located depends on your project.
Now you can update or install the current version using the NuGet client as usual.
This error can occur if the Visual Studio has not updated all binary files used in the project directory after an update to a newer version of the SDK. Therefore, perform the following steps:
If the execution error persists, the following steps should resolve the problem:
If none of these approaches solve the problem, send the problem and details about the exception or its InnerException to support@traeger.de.
The OPC UA .NET SDK comes with a test license that can be used for 30 minutes without restrictions for client and server development per application start. If this restriction limits your evaluation options, you can apply for an alternative test license from us free of charge.
Just ask our support (via support@traeger.de) or let us advise you directly and clarify open questions with our developers!
The OPC UA .NET SDK comes with a test license that can be used for 30 minutes without restrictions for client and server development per application start. If this restriction limits your evaluation options, you can apply for an alternative test license from us free of charge.
Just ask our support (via support@traeger.de) or let us advise you directly and clarify open questions with our developers!
The following types are mentioned here: OpcSubscription, OpcMonitoredItem and OpcMonitoredItemStatus.
Various properties can be used to check whether a server supports the desired intervals or whether they are used:
PublishingInterval
can be checked via the CurrentPublishingInterval
property.SamplingInterval
can be checked via the Status.SamplingInterval
property.The main problem is frequently the configuration of the server. Depending on the S7 controller, only certain minimum values for the settings of the Subscriptions / MonitoredItems are supported. According to Siemens, the following minimum values apply:
Property | CPU | ||
---|---|---|---|
1510, 1511, 1512, 1513 | 1515, 1516, 1505S | 1517, 1518, 1507S | |
Maximum number of subscriptions with more than 1000 monitored elements per subscription over all sessions | 10 | 10 | 10 |
Maximum number of subscriptions with more than 1000 monitored elements per subscription over all sessions | 20 | 20 | 20 |
Maximum number of subscriptions per session | 20 | 20 | 20 |
Smallest possible sampling interval | 100 ms | 100 ms | 10 ms |
Smallest possible Send interval | 500 ms | 200 ms | 10 ms |
Maximum number of sessions | 32 | 48 | 64 |
Recommended maximum number of monitored elements over all subscriptions | 1000 | 1000 (1505S), 2000 | 10000 |
Source: What are the system limits of the OPC UA Server with S7-1500 with firmware V2.8.x?
Which limit values a server supports can be checked via various nodes in the path /Objects/Server/ServerCapabilities
and below that in the node OperationLimits
. A client application has no influence on these settings.
The following types are mentioned here: OpcObjectNode and OpcFolderNode.
The documentation for the OpcFolderNode states:
Because the OpcFolderNode is a subclass of the OpcObjectNode, there is no direct structural difference between the two types. An explicit difference is the ReferenceType used. The OpcFolderNode uses the Organizes reference type, while the OpcObjectNode uses the HasComponent reference type. The difference in the reference types used also reflects the purpose of the two types of nodes described above. In simple terms, the following can be defined:
The following types are mentioned here: OpcNodeId and OpcNominalNodeIdFactory.
Yes, the standard NodeIdFactory must be changed as follows:
OpcNodeId.Factory = new OpcNominalNodeIdFactory() { Separator = '.' };
The following types are mentioned here: OpcMethodNode and OpcArgumentAttribute.
Yes, by using return
, ref
and/or out
values. However, it should be noted that ref
values are used as input and as output arguments. The definition of such an OpcMethodNode could look like this:
private delegate void CalculateDelegate( int a, int b, ref int c, out int additionResult, out int differenceResult); private void Calculate( [OpcArgument("a", Description = "The left operand.")] int a, [OpcArgument("b", Description = "The right operand.")] int b, [OpcArgument("c", Description = "Factor")] ref int c, [OpcArgument("add", Description = "The result of addition.")] out int additionResult, [OpcArgument("diff", Description = "The result of difference.")] out int differenceResult) { additionResult = (a + b) * c; differenceResult = (a - b) * c; } this.methodNode = new OpcMethodNode( this.folderNode, nameof(Calculate), new CalculateDelegate(this.Calculate));
The following types are mentioned here: OpcVariableNode, OpcVariableValue and OpcWriteVariableValueContext.
Yes, by checking the value to be written using a user-defined callback routine. Such a callback routine could then look like this:
this.variableNode.WriteVariableValueCallback = this.WriteToNode; // Deny write of a specific type of value. private OpcVariableValue WriteToNode( OpcWriteVariableValueContext context, OpcVariableValue value) { if (!(value.Value is short)) value.Status.Update(OpcStatusCode.BadTypeMismatch); return value; }
The following types are mentioned here: OpcVariableNode, OpcVariableValue and OpcWriteVariableValueContext.
Yes, with the help of a user-defined callback routine, the value can be converted to the desired target data types before writing. The procedure could look something like this:
// Inline change type of value to the expected type. private OpcVariableValue WriteToNode( OpcWriteVariableValueContext context, OpcVariableValue value) { if (!(value.Value is short)) { value = new OpcVariableValue( Convert.ChangeType(value.Value, typeof(short)), value.Timestamp ?? DateTime.UtcNow, value.Status); } return value; }
The SDK is optimized for numerous behaviors of other OPC UA Client and Server applications and tries to detect them autonomously and behave accordingly so that the result matches the one expected by the user. The measures and topics explicitly listed below are frequently requested.
Yes, as of version 2.23.0.0 of the OPC UA SDK, the measures recommended by Microsoft for OPC Classic (for communication via DCOM or OPC DA, OPC HDA and OPC AE) are implemented.
Background:
Known as CVE-2021-26414, Microsoft addresses the issue with a guide for DCOM Client and DCOM Server applications.
As part of the guide, Microsoft describes the actions gradually taken to permanently resolve the issue. After implementation of the final phase on June 14, 2022, there may be communication issues between DCOM Client and DCOM Server applications. This is expected to affect some of the applications communicating via OPC Classic.
For further support, even after the completion of the measures to solve the 'CVE-2021-26414' issue, the OPC UA SDK implements the Microsoft recommended Authentication Levels for communication via OPC Classic. This logic was released as part of version 2.23.0.0 of the SDK.