Skip to content

Running the Device Simulators

The tutorial includes the use of Modbus and OPC-UA device simulators. These should be started and configured as described below.

Info

Edge Xpert describes how devices should be connected to the platform with the help of Device Profiles. This tutorial supplies ChemicalTank.yaml and OutletValve.yaml files that describe the Modbus and OPC-UA devices respectively. The instructions below configure the Modbus and OPC-UA simualtors to match those device profiles

Start ModbusPal

Use the below command to start the ModbusPal simulator provided in the tutorial project:

sudo java -jar ModbusPal.jar

Note

sudo permissions are required in order to use the default Modbus TCP port of 502

If the simulator appears to not start, check librxtx-java is installed as mentioned here

It should start up as follows:

ModbusPal

Warning

It is important to use the ModbusPal.jar provided in the tutorial project. Other versions of ModbusPal have been found to not work correctly with loaded simulation files

Once started, load the supplied chemical tank simulation file by navigating to Project, selecting Load and choosing the ModbusSimulation.xmpp file from the tutorial project.

Now start the simulation as follows:

  • Under Automation, select Start All
  • Under Link settings, select Run
  • Clicking the “eye” icon shows the changing values for Temperature, Pressure and Level:

ModbusPal Simulator Eye ModbusPal Simulator Values

Start Prosys

Use the below command to start the OPC-UA Simulation Server, noting that the path may vary depending on where it was installed

./prosys-opc-ua-simulation-server/UaSimulationServer

Note

The tutorial uses a specific node of the Prosys OPC-UA Server to represent our OPC-UA Outlet Valve. The default configuration of Prosys may change depending on its version, so it is important to check that there is a valid Prosys node ID to match the attribute values configured in the tutorial-supplied OutletValve.yaml

Follow these steps to check the Prosys configuration (only required once):

  • Switch to expert mode (Options -> Switch to Expert Mode)

Prosys Expert Mode

  • Go to the Address Space tab in the Prosys Simulation Server
  • Find UInt16 under Objects -> Static Data -> Static Variables -> UInt16
  • Check the NodeId, this should be ns=5, s=UInt16, as configured in OutletValve.yaml

NodeId

  • If the NodeID is different to this, please edit the nodeID and nsIndex values in the OutletValve.yaml file to match the Prosys values
  attributes:
    IDType: STRING
    monitored: "True"
    nodeID: UInt16
    nsIndex: "5"

Note

Some Prosys users have reported startup issues associated with IPV6 on Ubuntu. It may be necessary to temporarily disable IPV6 in order to start Prosys

Back to top