In this example, a CANopen Master runs on RevPi Connect with ConCAN module and exchanges data with KUNBUS CANopen and Modbus RTU Gateways.
The example runs a CANopen Master and Modbus RTU Master on a RevPi Connect. The KUNBUS Gateway CANopen Gateway and Gateway Modbus RTU act as CANopen Slave and Modbus RTU Slave.
The RS485 interface of the RevPi Connect is connected to the Gateway Modbus RTU and the ConCAN interface is connected to the Gateway CANopen. The two Gateways namely Gateway Modbus RTU and Gateway CANopen are connected over piBridge. A byte of data is exchanged from CANopen and Modbus RTU networks and the value is incremented by one in the next application cycle.
Following figure shows the CODESYS device tree view of the example.
“Application mapping” of the first byte from CANopen Master running on the RevPi Connect with CANopen Gateway.
“Application mapping” of the first byte from Modbus RTU Master running on the RevPi Connect with Modbus RTU Gateway.
Following figure shows the application logic of this example.