Using OpcCmd Utility as OPC UA Client

From OPC Labs Knowledge Base

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

Commands, Arguments and Options

Command: uaClient subscribe

OpcCmd -i
uaClient
subscribe opc.tcp://opcua.demo-this.com:51210/UA/SampleServer nsu=http://test.org/UA/Data/;i=10849

Obtaining server condition statistics:

  1. Enter uaClient -ServerConditionChanged.
  2. Enter subscribe opc.tcp://opcua.demo-this.com:51210/UA/SampleServer nsu=http://test.org/UA/Data/;i=10849.
  3. Optionally terminate the command prematurely by pressing X.
  4. Wait for approx. 10 seconds.
  5. Enter events?, or shortened: ev?. Note the index of the last event (in the "[]" column).
  6. Enter events? -!extractElement <nn> -!extractMember EventArgs.Statistics.StateDictionary, or shortened: ev? -!xe <nn> -!xm EventArgs.Statistics.StateDictionary where <nn> is the index of the last event, taken in previous step.