Using OpcCmd Utility as OPC DA Client: Difference between revisions

From OPC Labs Knowledge Base
Line 31: Line 31:
</syntaxhighlight>
</syntaxhighlight>
== OPC DA Optimizer settings ==
== OPC DA Optimizer settings ==
Turn off request chunking: <code>plugins configuration part DAOptimizerPluginParameters set EnableRequestChunking [Boolean]False</code>
Turn off request merging: <code>plugins configuration part DAOptimizerPluginParameters set EnableRequestMerging [Boolean]False</code>
Turn off request merging: <code>plugins configuration part DAOptimizerPluginParameters set EnableRequestMerging [Boolean]False</code>


Turn off subscription blending: <code>plugins configuration part DAOptimizerPluginParameters set EnableSubscriptionBlending [Boolean]False</code>
Turn off subscription blending: <code>plugins configuration part DAOptimizerPluginParameters set EnableSubscriptionBlending [Boolean]False</code>
== Volume Testing ==
== Volume Testing ==
In order to subscribe to the same item many times, use the '''multiple''' sub-command with the '''--count''' option. You will probably need to combine this with turning off the subscription blending.
In order to subscribe to the same item many times, use the '''multiple''' sub-command with the '''--count''' option. You will probably need to combine this with turning off the subscription blending, and consider turning off request chunking.


Example: <code>subscribeItem http://opcxml.demo-this.com/XmlDaSampleServer/Service.asmx "Dynamic/Analog Types/Double" multiple --count 2000</code>
Example: <code>subscribeItem http://opcxml.demo-this.com/XmlDaSampleServer/Service.asmx "Dynamic/Analog Types/Double" multiple --count 2000</code>

Revision as of 14:53, 3 February 2021

For general information about the OpcCmd tool, see Category:OpcCmd Utility.

Commands, Arguments and Options

Command: daClient subscribeItem

OpcCmd -i
daClient
subscribeItem OPCLabs.KitServer.2 Demo.Ramp 200

Tips and Tricks

Using OPC NET API implementation

If you want to use the OPC NET API implementation instead of the native implementation (in OpcCmd for .NET Framework), you can do it interactively as in the following example:

OpcCmd -i
daClient --property InstanceParameters.EnableNativeClient=[Boolean]false
subscribeItem OPCLabs.KitServer.2 Demo.Ramp 200

If you want to use such setting permanently, you can modify one of the OpcCmd Built-in Component Configuration files (JSON, INI or XML). For example, with the JSON format, put the following into the appsettings.json or appsettings.production.json file:

{
  "OpcLabs.EasyOpc.DataAccess.EasyDAClient": {
    "InstanceParameters": {
      "EnableNativeClient": false
    }
  } 
}

OPC DA Optimizer settings

Turn off request chunking: plugins configuration part DAOptimizerPluginParameters set EnableRequestChunking [Boolean]False

Turn off request merging: plugins configuration part DAOptimizerPluginParameters set EnableRequestMerging [Boolean]False

Turn off subscription blending: plugins configuration part DAOptimizerPluginParameters set EnableSubscriptionBlending [Boolean]False

Volume Testing

In order to subscribe to the same item many times, use the multiple sub-command with the --count option. You will probably need to combine this with turning off the subscription blending, and consider turning off request chunking.

Example: subscribeItem http://opcxml.demo-this.com/XmlDaSampleServer/Service.asmx "Dynamic/Analog Types/Double" multiple --count 2000