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:
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:
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)
- Go to the Address Space tab in the Prosys Simulation Server
- Find Int16 under Objects -> Static Data -> Static Variables -> Int16
- Check the
DataType
andNodeId
,identifier
should be4
andnamespaceIndex
should be5
, as configured in OutletValve.yaml
- If the
DataType
andNodeId
are different to this, please edit theidentifier
andnamespaceIndex
values in the OutletValve.yaml file to match the Prosys values.
attributes:
dataTypeId:
identifier: 4
identifierType: NUMERIC
namespaceIndex: 0
nodeAttribute: value
nodeId:
identifier: Int16
identifierType: STRING
namespaceIndex: 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