Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The OPC UA Server Simulator is a built-in tool of the software platform that emulates the behavior of an OPC UA server. It exists to facilitate the testing and development of OPC UA client applications in the absence of physical hardware. The simulator generates simulated data and provides a hierarchical address space for clients to interact with. Potential uses include testing client functionality, prototyping data models, and experimenting with OPC UA communication patterns. Users can configure server settings, define the data structure, and launch the simulator through its graphical interface or by using command-line parameters. Once running, OPC UA clients can discover and connect to the simulator as they would with a real OPC UA server.

On this page:

Table of Contents
maxLevel3
minLevel2
stylenone


Overview

This page contains information on the OPC UA Server Simulator Configuration and Runtime behavior.

The OPC Simulator can be Started from the DataExplorer User interface, or running its executable directly with the proper command line parameters. 

When running, it will

created a

create an OPC

-

UA server, populating

topics

the Address Space with simulated data. From the client point of view, the OPC Simulator, will just be found and act as it was any other OPC

-

UA server.

 

Image Added


On this page:

Table of Contents
maxLevel3
minLevel2

Simulator Configuration

The simulator OPC UA Server Simulator is divided in three regions: a TreeView display, Configuration settings for simulation and runtime monitoring, and a Client Connections list.To start up the OPC Server, use the button in the top-right corner (1).

Image Removed

Note: The OPC Server endpoint URL cannot be changed. Defaults is opc.tcp://127.0.0.1:4840. The OPC Server is configured for the following Security Policies:

  • None.

  • Basic256Sha256 - Sign&Encrypt.

  • Aus128_Sha256_RsaOaep - Sign&Encrypt.

If a third-party OPC Client tries to connect using one of the Security Policies other than None, you should see a dialog window popping up with some information about the Certificate issued by the OPC Client.

two main regions. Configuration (customize Server settings and DataStructure) and View (DataBrowser and Client Connection List).

Server Configuration

The Server Configuration component enables users to customize server-specific settings.

  • Server URL: Read-Only field, indicating the communication endpoint URL for Client-Server interactions. It is composed by the localhost address and Server Port field.

  • Server Port: Defines the OPC UA Server port to be used as Server URL.

  • Security: Defines which security policies will be enabled in the Server

    • None.

    • Basic256

    • Basic128Rsa15

    • Basic256Sha256

  • AutoStart: OPC Server is started automatically (valid for the next time the application is started).

  • Start Minimized: Application starts minimized (valid for the next time the application is started).

  • Auto Trust Client Certificates: Server will automatically trust incoming connections using security. If False, a popup window will appear, so the user can choose to Trust or Reject the Client certificate

Use the Trust button to allow the Client connection, or Reject to block it.

You can store the OPC Client in the Server’s trusted list, enabling the Save to Trust List CheckBox.

Image Removed

Simulation Settings

Image Added


Info

The fields can only be modified while the OPC Server is not running.

Data Structure

In this tab, you will be able to configure the Data Structure for the OPC Server address space.

Image Removed

Where:

  • NodeName: Name of the Node (folder) that will be used in the OPC Server Address space. The final name will be a concatenation of the defined NodeName and NumberOfNodes.

  • NumberOfNodes: Defines the number of nodes in the server.

  • TagName: Name of the Tag (variable) that will be used in the OPC Server Address space. The final name will be a concatenation of the defined TagName and NumberOfTags.

  • NumberOfTags: Defines the number of tags in each node.

Use the Apply button to make sure any changes are applied to the Server.

You can not alter any Simulation Settings parameters while the server is running.

Runtime Monitoring

In this tab, you will be able to monitor some properties of your OPC Server variables. The output fields will display information on the variable selected in the TreeView.

Image Removed

Where:

  • NodeId: DataStructure that represents an element of the OPC Server.

  • DisplayName: Friendly name defined for element.

  • NodeClass: Class of the node. E.g.: Object, Variable.

  • DataType: Variable DataType.

  • Value: Variable Value.

  • Timestamp: Variable Timestamp.

TreeView

Image Added

The structure is defined based on a hierarchical structure that is illustrated below.

Code Block
languagexml
<MainNodeName> |-- Area1 | |-- Device1 | | |-- Var1 | | |-- ... | | |-- VarN | |-- Device2 | | |-- Var1 | | |-- ... | | |-- VarX |-- Area2 |-- Device1 | |-- Var1 |-- Device2 |-- Var1

To edit the structure, click on the Edit Data Structure and customize your OPC Server structure at the dialog window.

Image Added

There are some properties to be defined for Variables:

  • Type: Define the Variable DataType. Options are:

    • Double

    • Integer

    • Long

    • Boolean

    • String

  • VariationFlag: Flag that indicates if variable value will be simulated every second in Runtime.

  • Min: Defines the minimum value for simulated data.

  • Max: Defines the maximun value for simulated data.


Info

The DataStructure can only be edited while the OPC Server is not running.

Data Browser

In this region, you will be able to see the OPC Server Address space in a TreeView structure.

Image AddedImage Removed

Info

The TreeView connects only to the OPC Simulator. It cannot be used to connect to other OPC Servers.

Client Connections List

In this tab, you can monitor the clients that are/were connected to the OPC Server.

Image RemovedImage Added

Where:

  • ClientName: Name of the Client’s session.

  • Connected At: DateTime the Client connected to the Server.

  • Disconnected At: DateTime the Client disconnected from the Server. The Client Connections list is cleared if the OPC Server is stopped.


Command Line Parameters

The OPC Simulator can be executed with custom parameters through the command line. The syntax is as follows:

Code Block
"..\OPCUA_SimulatorOPCUASimulator.exe" /param1:<param1Value> ... /paramN

The existing parameters are listed below:

  • Minimized: Application starts minimized.
  • AutoStart: OPC Server is started automatically.
  • AutoTrustClientCertificates: Server will automatically trust incoming connections using security. If False, a popup window will appear, so the user can choose to Trust or Reject the Client certificate
  • Port: Defines the OPC UA Server port to be used as Server URL.
  • ConfigDataSource: Full path for *.xml configuration file with Server Configuration and custom Address spaceDataStructure. More details on the syntax for the *.xml file in section 4.NumberOfNodes
  • Path: Number of nodes for OPC Server Address Space. [Default configuration only].NumberOfTags: Number of tags in each node for OPC Server Address space.
    [Default configuration only].Full path of a FrameworX solution directory in which a configuration file can be found

Usage:

Code Block
"..\OPCUA_Simulator.exe" /Minimized /AutoStart
                         /DataSourceConfig:"C:\Documents\CustomSource.xml"
                         /NumberOfTags: 4
                         /NumberOfNodes: 2


Info

The input parameters are not case-sensitive



Custom

DataSource

Configuration (*.xml)

With a custom configuration file, you will be able to define your own OPC Server Configuration and DataStructure. The syntax for the configuration is described below:

Code Block
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <MyCustomObjects>
    <Motors>
      <Motor1>
        <Current DataType="Double
<OPCServerConfiguration>
	<SimulatorControl>
		<ServerPort>4840</ServerPort>
		<AutoStart>false</AutoStart>
		<Minimized>false</Minimized>
		<AutoTrustClientCertificates>false</AutoTrustClientCertificates>
		<SecuritySettings>
			<None>true</None>
			<Basic256>false</Basic256>
			<Basic128Rsa15>false</Basic128Rsa15>
			<Basic256Sha256>false</Basic256Sha256>
		</SecuritySettings>
	</SimulatorControl>
	<DataStructure>
		<Node Name="OPCServerObjects">
			<Node Name="Area1">
				<Node Name="Motor1">
					<Variable Name="Current" Type="Double" VariationFlag="true" Min="-20" Max="20" />
					<Variable Name="Voltage"       <Voltage DataType="DoubleType="Double" VariationFlag="true" Min="12" Max="14" />
					<Variable Name="Temperature"       <Temperature DataType="IntegerType="Integer" VariationFlag="true" Min="40" Max="60" />
					<Variable        <Status DataTypeName="Status" Type="Boolean" VariationFlag="true"/>
					<Variable        <LastMessage DataTypeName="LastMessage" Type="String" MaxVariationFlag="10true" />
      </Motor1>
    </Motors>
    <Controllers>
      <Controller1>
        <Kp DataType="Double				</Node>				
				<Node Name="Controller1">
					<Variable Name="Kp" Type="Double" VariationFlag="false" Min="0" Max="50"/>
					<Variable Name="Ki"       <Ki DataType="DoubleType="Double" VariationFlag="false" Min="0" Max="100"/>
					<Variable Name="Setpoint" Type="Double" VariationFlag="false" Min="60" Max="65"/>
				</Node>
			</Node>
			<Node Name="Area2">
				<Node  <Setpoint DataTypeName="Motor1">
					<Variable Name="Current" Type="Double" VariationFlag="true" Min="60-20" Max="6520"/>				
				</Node>
				<Node Name="Controller1">
					<Variable Name="Kp" Type="Double" VariationFlag="false" Min="0" Max="50"/>
				</Controller1>
    Node>
			</Controllers>Node>
  		</MyCustomObjects>Node>	
</configuration>	</DataStructure>
</OPCServerConfiguration>



In this section:

You can customize the Levels and Variables in any way, as long as it follows the correct XML syntax. The Variables are customized with the attributes:

  • DataType: Defines the variable type. Options are:

    • Double.

    • Integer.

    • Boolean.

    • Long.

    • String.

  • Min: Defines the minimum value for simulated data.

    • If not present, defaults to 0 (zero).

    • If DataType is Boolean, not used.

    • If DataType is String, not used.

  • Max: Defines the maximum value for simulated data.

    • If not present, defaults to 100.

    • If DataType is Boolean, not used.

    • If DataType is String, will define the string length to be simulated.

Info

The only obligation for the XML file is to contain the <configuration></configuration> entries.

In this section...

Page Tree
root@parent
spaces93DRAFT