Using OpcCmd Utility as OPC UA Server: Difference between revisions

From OPC Labs Knowledge Base
 
(8 intermediate revisions by the same user not shown)
Line 4: Line 4:
= Commands, Arguments and Options =
= Commands, Arguments and Options =


== Command: uaServer start ==
== Command: '''uaServer''' ==


This command starts an OPC UA server with pre-defined content (data variables with various behavior and data types under the standard '''Objects''' folder). By default, it opens its endpoint on "opc.tcp://localhost:48040/".
This command creates an OPC UA server with pre-defined content (data variables with various behavior and data types under the standard '''Objects''' folder). By default, it will open its endpoint (when started) on "opc.tcp://localhost:48040/".


== Command: uaServer addMesh ==
If you simply enter the <code>uaServer</code> command (optionally with some arguments, but no sub-commands), the OpcCmd enters an interactive mode for this command, and you can continue by issuing one or more sub-commands, each on a separate line. Alternatively, you can include some sub-command directly following the <code>uaServer</code> command (with its optional arguments), in which case the sub-command will be performed immediately.


This command adds nodes to the OPC UA server address space mesh. You need to specify the mesh name, and optionally a mesh-specific parameter. Currently, only one mesh is available, named '''PredefinedNodes'''. The optional parameter is an integer specifying the count of shared counter nodes (defaults to 10000).  
'''CAUTION''': Each '''uaServer''' command invocation works on a separate, new server component. If you want to perform multiple operations with the same server, issue the '''uaServer''' command (and its arguments) just once, entering its interactive mode (manifested by the '''uaServer>''' prompt on the console). Then, issue the sub-commands (such as '''start'''), leaving out the '''uaServer''' command prefix.
 
== Command: '''uaServer start''' ==
 
This command starts the OPC UA server.
 
While the '''start''' command is executing, events related to the edge node operations are displayed on the console.
 
=== Sub-commands ===
By default, the server runs until the you press {{Style=keyboard|X}} on the keyboard. Use the '''!wait''' sub-command to specify a finite duration.
 
== Command: '''uaServer addMesh''' ==
 
This command adds nodes to the OPC UA server address space mesh. You need to specify the mesh name, and optionally a mesh-specific parameter. Currently, only one mesh is available, named '''PerformanceNodes'''. The optional parameter is an integer specifying the count of shared counter nodes (defaults to 10000).  


The mesh(es) need to be added before you start the server.
The mesh(es) need to be added before you start the server.
Line 16: Line 29:
Example:
Example:


<code>uaServer addMesh PredefinedNodes 20000</code>
<code>uaServer<br>
addMesh PerformanceNodes 20000<br>
start</code>

Latest revision as of 10:32, 25 August 2025

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

Commands, Arguments and Options

Command: uaServer

This command creates an OPC UA server with pre-defined content (data variables with various behavior and data types under the standard Objects folder). By default, it will open its endpoint (when started) on "opc.tcp://localhost:48040/".

If you simply enter the uaServer command (optionally with some arguments, but no sub-commands), the OpcCmd enters an interactive mode for this command, and you can continue by issuing one or more sub-commands, each on a separate line. Alternatively, you can include some sub-command directly following the uaServer command (with its optional arguments), in which case the sub-command will be performed immediately.

CAUTION: Each uaServer command invocation works on a separate, new server component. If you want to perform multiple operations with the same server, issue the uaServer command (and its arguments) just once, entering its interactive mode (manifested by the uaServer> prompt on the console). Then, issue the sub-commands (such as start), leaving out the uaServer command prefix.

Command: uaServer start

This command starts the OPC UA server.

While the start command is executing, events related to the edge node operations are displayed on the console.

Sub-commands

By default, the server runs until the you press X on the keyboard. Use the !wait sub-command to specify a finite duration.

Command: uaServer addMesh

This command adds nodes to the OPC UA server address space mesh. You need to specify the mesh name, and optionally a mesh-specific parameter. Currently, only one mesh is available, named PerformanceNodes. The optional parameter is an integer specifying the count of shared counter nodes (defaults to 10000).

The mesh(es) need to be added before you start the server.

Example:

uaServer
addMesh PerformanceNodes 20000
start