Using OpcCmd Utility as OPC A&E Client: Difference between revisions

From OPC Labs Knowledge Base
Line 15: Line 15:
OpcCmd -i
OpcCmd -i
aeclient
aeclient
subscribeEvents subscribeEvents OPCLabs.KitEventServer.2 -sqn Simulation.ConditionState1
subscribeEvents OPCLabs.KitEventServer.2 -sqn Simulation.ConditionState1
events?
events?
acknowledgeCondition --eventIndex 2
acknowledgeCondition --eventIndex 2
 
</pre>
== Command: aeClient subscribeEvents ==
Example:
<pre>
OpcCmd -i
aeclient
subscribeEvents OPCLabs.KitEventServer.2
</pre>
= Using OPC NET API implementation =
= 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:
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:

Revision as of 19:07, 4 February 2021

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

Commands, Arguments and Options

Command: aeClient subscribeEvents

Example:

OpcCmd -i
aeclient
subscribeEvents subscribeEvents OPCLabs.KitEventServer.2

Command: aeClient acknowledgeCondition

Example:

OpcCmd -i
aeclient
subscribeEvents OPCLabs.KitEventServer.2 -sqn Simulation.ConditionState1
events?
acknowledgeCondition --eventIndex 2

Command: aeClient subscribeEvents

Example:

OpcCmd -i
aeclient
subscribeEvents OPCLabs.KitEventServer.2

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
aeclient --property InstanceParameters.EnableNativeClient=[Boolean]false
subscribeEvents subscribeEvents OPCLabs.KitEventServer.2

If you want to use such setting permanently, you can modify one of the OpcCmd Intrinsic 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.AlarmsAndEvents.EasyAEClient": {
    "InstanceParameters": {
      "EnableNativeClient": false
    }
  } 
}