This tutorial demonstrates how to run a CANopen Master on a RevPi Connect with a RevPi Con CAN module and exchange data with KUNBUS Gateways CANopen and Modbus RTU.
Prerequisites #
Hardware #
✓ 1 RevPi Connect
✓ 1 RevPi Con CAN
✓ The RS485 interface of the RevPi Connect is connected to the Modbus RTU Gateway
✓ The Con CAN interface of the RevPi Connect is connected to the CANopen Gateway
✓ Both Gateways are connected via the PiBridge
For detailed instructions about how to set up your system, see Getting Started.
Software #
✓ CODESYS Development System installed on your PC
To ensure a compatible system with suitable software, see CODESYS System Requirements.
Overview #
The example runs:
-
A CANopen Master and a Modbus RTU Master on a RevPi Connect.
-
KUNBUS CANopen Gateway as a CANopen Slave.
-
KUNBUS Modbus RTU Gateway as a Modbus RTU Slave.
-
A byte of data is exchanged between the CANopen and Modbus RTU networks.
-
The application logic increments the value by 1 in each application cycle.
The following figure shows the CODESYS device tree overview of the example.

Application Mapping of the first byte from the CANopen Master running on the RevPi Connect with the CANopen Gateway.

Application Mapping of the first byte from the Modbus RTU Master running on the RevPi Connect with the Modbus RTU Gateway.

The following figure shows the application logic of this example.
