Using OpcCmd Utility as OPC UA Client: Difference between revisions
From OPC Labs Knowledge Base
No edit summary |
|||
Line 11: | Line 11: | ||
subscribe opc.tcp://opcua.demo-this.com:51210/UA/SampleServer nsu=http://test.org/UA/Data/;i=10849 | subscribe opc.tcp://opcua.demo-this.com:51210/UA/SampleServer nsu=http://test.org/UA/Data/;i=10849 | ||
</pre> | </pre> | ||
Obtaining server condition statistics: | |||
# Enter <code>uaClient -ServerConditionChanged</code>. | |||
# Enter <code>subscribe opc.tcp://opcua.demo-this.com:51210/UA/SampleServer nsu=http://test.org/UA/Data/;i=10849</code>. | |||
# Optionally terminate the command prematurely by pressing {{Style=keyboard|X}}. | |||
# Wait for approx. 10 seconds. | |||
# Enter <code>events?</code>, or shortened: <code>ev?</code>. Note the index of the last event (in the "[]" column). | |||
# Enter <code>events? -!extractElement <nn> -!extractMember EventArgs.Statistics.StateDictionary</code>, or shortened: <code>ev? -!xe <nn> -!xm EventArgs.Statistics.StateDictionary</code> where <nn> is the index of the last event, taken in previous step. |
Revision as of 16:21, 30 June 2021
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:
- Enter
uaClient -ServerConditionChanged
. - Enter
subscribe opc.tcp://opcua.demo-this.com:51210/UA/SampleServer nsu=http://test.org/UA/Data/;i=10849
. - Optionally terminate the command prematurely by pressing X.
- Wait for approx. 10 seconds.
- Enter
events?
, or shortened:ev?
. Note the index of the last event (in the "[]" column). - 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.