Using OpcCmd Utility as OPC A&E Client: Difference between revisions
Line 14: | Line 14: | ||
Acknowledging a condition requires an event to be identified by a precise combination of several pieces of information. In order to make the acknowledging easier, the '''acknowledgeCondition''' command allows you to pick the event from those collected during previous event subscriptions. Using the <code>--eventIndex</code> option (can be shortened to <code>-ei</code>), you specify the index of the event you want to acknowledge. | Acknowledging a condition requires an event to be identified by a precise combination of several pieces of information. In order to make the acknowledging easier, the '''acknowledgeCondition''' command allows you to pick the event from those collected during previous event subscriptions. Using the <code>--eventIndex</code> option (can be shortened to <code>-ei</code>), you specify the index of the event you want to acknowledge. | ||
When event output is on, the event indexes appear in front of every displayed event in angle brackets, such as "[2]". You can also use the <code>events?</code> command (<code>ev?</code>) to display the events previously collected. | |||
Example: | Example: |
Revision as of 14:11, 5 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 OPCLabs.KitEventServer.2
Command: aeClient acknowledgeCondition
The acknowledgeCondition
command (can be shortened to ac
) acknowledges a condition in the events server.
Acknowledging a condition requires an event to be identified by a precise combination of several pieces of information. In order to make the acknowledging easier, the acknowledgeCondition command allows you to pick the event from those collected during previous event subscriptions. Using the --eventIndex
option (can be shortened to -ei
), you specify the index of the event you want to acknowledge.
When event output is on, the event indexes appear in front of every displayed event in angle brackets, such as "[2]". You can also use the events?
command (ev?
) to display the events previously collected.
Example:
OpcCmd -i aeclient subscribeEvents OPCLabs.KitEventServer.2 -sqn Simulation.ConditionState1 events? acknowledgeCondition --eventIndex 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
}
}
}