Skip to content

Software Network Protocols Bridge Generation

Network Protocols Bridge (NPB) is a software component that can bridge different industrial network protocols, including Modbus TCP, OPC UA PubSub, EtherNet/IP Class 1, ROS 2, and CANopen. The generation of this software component from the AAS model is integrated into the Papyrus4Manufacturing.


Step-by-Step Guide

This section presents three basic steps to generate software NPB.

Step 1: Generate NPB Java Maven project

In the Model Explorer window, right click at the AAS, go to AAS > Generate Network Protocols Bridge (NPB). If the AAS model design is correct, then a new generate code folder will appear in the Project Explorer window and it will show no error (no red star on the project icon).

If there is no new generated folder or a new project is generated with a red star, you should recheck the AAS model design and re-generate it.

download
Figure 1. Successful new generated Java Maven project for NPB

Note: The files generated can be different depended on the featureId.

Step 2: Build the NPB software

Two methods to build the NPB software. First, in the Project Explorer window, right click at the pom.xml file, go Maven > Update Project.... In the new appeared window, check Force Update of Snapshots/Releases, click OK. Right click at the pom.xml again, go to Run As > Maven Install.

In the second, open a terminal. Run the following commands:

$ cd <YOUR_PROJECT_WORKSPACE>
$ mvn clean install -U

download
Figure 2. Successful build with the second method

Usage

You can run the NPB on the Papyrus4Manufacturing environment: In the Project Explorer, right click at the project folder of the NPB, go to Run As > Java Application.

Note: If an error related to root privileges occur due to the need of root access for some ports (e.g. default port 502 for Modbus TCP), re-run Papyrus4Manufacturing with sudo.

Another method is to use Docker. Search for the docker images generated by the build then run it with adequate parameters. We supports also a run.sh including the command the Docker with pre-defined parameters in the generated NPB folder.

If the NPB boots correctly, the console will show no error and all network interfaces are raised properly.

download
Figure 3. Successful run NPB

Helpful Tips

This section presents some useful tips to build and run NPB.

Devices configuration

The EtherNet/IP device must work in adapter mode and be turned on before connecting to the NPB. In other words, the EtherNet/IP device needs to boot first, then you can launch the NPB. You should get the parameters in the EDS associated to the EtherNet/IP device to configure the application.properties file of NPB. This configuration requires knowledge on the EtherNet/IP.

To test CANopen device, you can use a virtual can (vcan) interface and using a tunnel to translate CAN-Socket data messages.

Network configuration

To check the available network interfaces in your computer, you can use one of following commands:

$ ifconfig
$ ip address

To raise network interface vcan0 required by CANopen, you use the following commands:

$ sudo modprobe vcan
$ sudo ip link add dev vcan0 type vcan
$ sudo ip link set vcan0 mtu 16
$ sudo ip link set up vcan0

Some default values of network interfaces' configuration:
- The default port of ModbusTCP is 502.
- The default port of OPC UA PubSub is 4801.
- The default port of EtherNet/IP is 2222 and 44818.
- The default ROS DOMAIN ID of ROS2 is 0.