Difference between revisions of "Using OpcCmd Utility as OPC UA Client"
Jump to navigation
Jump to search
(Created page with "Category:OPC UA Category:OpcCmd Category:Tools For general information about the OpcCmd tool, see Category:OpcCmd. = Commands, Arguments and Options = == Co...") |
|||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | [[Category:OPC UA]] [[Category:OpcCmd]] [[Category:Tools]] | + | [[Category:OPC UA]] [[Category:OpcCmd Utility]] [[Category:Tools and Online Services]] |
− | For general information about the OpcCmd tool, see [[:Category:OpcCmd]]. | + | For general information about the OpcCmd tool, see [[:Category:OpcCmd Utility]]. |
= Commands, Arguments and Options = | = Commands, Arguments and Options = | ||
+ | |||
+ | == Command: uaClient browse == | ||
+ | |||
+ | Setting a "browse chunk" size: | ||
+ | <pre> | ||
+ | uaClient | ||
+ | set IsolatedParameters.SessionParameters.MaximumReferencesPerBrowseNode [Int32]400 | ||
+ | browse opc.tcp://localhost:49320 nsu=KEPServerEX;ns=2;s=Simulation.Functions | ||
+ | </pre> | ||
== Command: uaClient subscribe == | == Command: uaClient subscribe == | ||
Line 10: | Line 19: | ||
uaClient | uaClient | ||
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> | ||
+ | |||
+ | Obtaining server condition statistics: | ||
+ | # Enter <code>uaClient --ConnectionMonitoring</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. | ||
+ | Sample output: | ||
+ | <pre> | ||
+ | Events (extracting: element 77, member 'eventargs.statistics.statedictionary') (sequence): 5 element(s) | ||
+ | ╒═════════════╤═════╤════════════╤════════════╤════════════╤══════════════════╤════════════╤═══════════════════╤══════════════════╤══════════════════╤══════════════════╤══════════════════╕ | ||
+ | │[] │Enter│First Enter │Last Cycle │Last Cycle │Last Cycle Time │Last Enter │Current Active Time│Accumulated Time │Minimum Time Span │Average Time Span │Maximum Time Span │ | ||
+ | │ │Count│Time Local │Enter Time │Leave Time │Span │Time Local │Span │Span │ │ │ │ | ||
+ | │ │ │ │Local │Local │ │ │ │ │ │ │ │ | ||
+ | ╞═════════════╪═════╪════════════╪════════════╪════════════╪══════════════════╪════════════╪═══════════════════╪══════════════════╪══════════════════╪══════════════════╪══════════════════╡ | ||
+ | │Connected │ 1│18:21:30.691│18:21:30.691│18:22:52.225│0:00:01:21.5320000│18:21:30.691│0:00:00:00.0000000 │0:00:01:21.5320000│0:00:01:21.5320000│0:00:01:21.5320000│0:00:01:21.5320000│ | ||
+ | │Connecting │ 1│18:21:29.928│18:21:29.928│18:21:30.691│0:00:00:00.7650000│18:21:29.928│0:00:00:00.0000000 │0:00:00:00.7650000│0:00:00:00.7650000│0:00:00:00.7650000│0:00:00:00.7650000│ | ||
+ | │Disconnected │ 2│18:21:29.841│18:21:29.841│18:21:29.928│0:00:00:00.0780000│18:22:52.400│0:00:00:00.0000000 │0:00:00:00.0780000│0:00:00:00.0780000│0:00:00:00.0780000│0:00:00:00.0780000│ | ||
+ | │Disconnecting│ 1│18:22:52.225│18:22:52.225│18:22:52.400│0:00:00:00.1870000│18:22:52.225│0:00:00:00.0000000 │0:00:00:00.1870000│0:00:00:00.1870000│0:00:00:00.1870000│0:00:00:00.1870000│ | ||
+ | │Unconnected │ 2│18:21:29.841│18:21:29.841│18:21:30.691│0:00:00:00.8430000│18:22:52.225│0:00:00:00.1870000 │0:00:00:00.8430000│0:00:00:00.8430000│0:00:00:00.8430000│0:00:00:00.8430000│ | ||
+ | ╘═════════════╧═════╧════════════╧════════════╧════════════╧══════════════════╧════════════╧═══════════════════╧══════════════════╧══════════════════╧══════════════════╧══════════════════╛ | ||
</pre> | </pre> |
Latest revision as of 12:15, 17 November 2021
For general information about the OpcCmd tool, see Category:OpcCmd Utility.
Commands, Arguments and Options
Command: uaClient browse
Setting a "browse chunk" size:
uaClient set IsolatedParameters.SessionParameters.MaximumReferencesPerBrowseNode [Int32]400 browse opc.tcp://localhost:49320 nsu=KEPServerEX;ns=2;s=Simulation.Functions
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 --ConnectionMonitoring
. - 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.
Sample output:
Events (extracting: element 77, member 'eventargs.statistics.statedictionary') (sequence): 5 element(s) ╒═════════════╤═════╤════════════╤════════════╤════════════╤══════════════════╤════════════╤═══════════════════╤══════════════════╤══════════════════╤══════════════════╤══════════════════╕ │[] │Enter│First Enter │Last Cycle │Last Cycle │Last Cycle Time │Last Enter │Current Active Time│Accumulated Time │Minimum Time Span │Average Time Span │Maximum Time Span │ │ │Count│Time Local │Enter Time │Leave Time │Span │Time Local │Span │Span │ │ │ │ │ │ │ │Local │Local │ │ │ │ │ │ │ │ ╞═════════════╪═════╪════════════╪════════════╪════════════╪══════════════════╪════════════╪═══════════════════╪══════════════════╪══════════════════╪══════════════════╪══════════════════╡ │Connected │ 1│18:21:30.691│18:21:30.691│18:22:52.225│0:00:01:21.5320000│18:21:30.691│0:00:00:00.0000000 │0:00:01:21.5320000│0:00:01:21.5320000│0:00:01:21.5320000│0:00:01:21.5320000│ │Connecting │ 1│18:21:29.928│18:21:29.928│18:21:30.691│0:00:00:00.7650000│18:21:29.928│0:00:00:00.0000000 │0:00:00:00.7650000│0:00:00:00.7650000│0:00:00:00.7650000│0:00:00:00.7650000│ │Disconnected │ 2│18:21:29.841│18:21:29.841│18:21:29.928│0:00:00:00.0780000│18:22:52.400│0:00:00:00.0000000 │0:00:00:00.0780000│0:00:00:00.0780000│0:00:00:00.0780000│0:00:00:00.0780000│ │Disconnecting│ 1│18:22:52.225│18:22:52.225│18:22:52.400│0:00:00:00.1870000│18:22:52.225│0:00:00:00.0000000 │0:00:00:00.1870000│0:00:00:00.1870000│0:00:00:00.1870000│0:00:00:00.1870000│ │Unconnected │ 2│18:21:29.841│18:21:29.841│18:21:30.691│0:00:00:00.8430000│18:22:52.225│0:00:00:00.1870000 │0:00:00:00.8430000│0:00:00:00.8430000│0:00:00:00.8430000│0:00:00:00.8430000│ ╘═════════════╧═════╧════════════╧════════════╧════════════╧══════════════════╧════════════╧═══════════════════╧══════════════════╧══════════════════╧══════════════════╧══════════════════╛