Application of PXB-6021: Transforming Modbus IO Modules into CANopen IO Modules

Application of PXB-6021: Transforming Modbus IO Modules into CANopen IO ModulesIn modern industrial control, we often encounter situations where Modbus IO needs to connect to CANopen IO. How can we achieve interoperability between these two different communication protocols?

PXB-6021 is a newly launched Modbus to CANopen protocol converter from Zhiyuan Electronics. It features 1 CAN channel, 1 100Mbps Ethernet port, and 1 RS485 port.This product supports Modbus RTU and Modbus TCP, enabling data conversion from Modbus master to CANopen slave.The PXB-6021 supports up to 12 TPDOs and 12 RPDOs, while also supporting EDS distribution and custom PDO and Modbus data mapping, characterized by fast conversion, simple setup, and flexible usage.

Next, we will use the PXB-6021 protocol converter to achieve communication between Modbus IO and CANopen IO.

Application of PXB-6021: Transforming Modbus IO Modules into CANopen IO Modules Principle Overview

The Modbus IO module connects to the CANopen network through the PXB-6021 protocol converter, allowing read and write operations on the Modbus IO module via the CANopen protocol.The PXB-6021 protocol converter and the Modbus IO module form an organic whole, realizing the functionality of a CANopen IO module, which is then controlled by the USBCAN-E-P CANopen master card.

Application of PXB-6021: Transforming Modbus IO Modules into CANopen IO Modules Preparation Requirements

  1. USBCAN-E-P CANopen master card and upper computer software CANManager for CANopen;

  2. PXB-6021 protocol converter and configuration software AWPX Tools;

  3. One relay-type Modbus IO module;

  4. Several Dupont wires, 1 USB cable, 1 Ethernet cable, and 1 terminal resistor of 120Ω;

  5. 12V power supply.

Application of PXB-6021: Transforming Modbus IO Modules into CANopen IO Modules Hardware Wiring

The device wiring is shown in Figure 1:

  1. The PXB-6021 protocol converter is connected to the PC via an Ethernet cable, and the USBCAN-E-P CANopen master card is connected to the PC via a USB cable;

  2. The CAN_H and CAN_L of the USBCAN-E-P CANopen master card are connected to the CAN_H and CAN_L of the PXB-6021’s CAN interface;

  3. The A and B terminals of the RS485 interface of the PXB-6021 are connected to the A and B terminals of the Modbus IO module.

Application of PXB-6021: Transforming Modbus IO Modules into CANopen IO Modules

Figure 1 Device Wiring Diagram

Application of PXB-6021: Transforming Modbus IO Modules into CANopen IO Modules PXB-6021 Parameter Configuration

Open the configuration software AWPX Tools for the PXB-6021, click to search for devices, and select the detected PXB-6021 device.

According to the data manual of the Modbus IO module, the baud rate used by the Modbus IO module is 9600, data length is 8, parity is None, and stop bits are 1. Configure the Modbus parameters of the PXB-6021 based on the above parameters, as shown in Figure 2.Application of PXB-6021: Transforming Modbus IO Modules into CANopen IO Modules

Figure 2 Modbus Parameter Configuration

Next, configure the CANopen parameters of the PXB-6021, as shown in Figure 3.

Application of PXB-6021: Transforming Modbus IO Modules into CANopen IO Modules

Figure 3 CANopen Parameter Configuration

According to the data manual of the Modbus IO module, as a Modbus slave device, the Modbus IO module needs to control the module’s IO by operating the coil registers of the Modbus IO module. Writing 0xFF00 to the coil register at address 0 means turning on the relay, while writing 0x0000 means turning off the relay, and the device address of the Modbus IO module is 255.

Based on this information, set the RPDO parameters: RPDO index is 0, operation unit is BIT, byte offset is 0, bit offset is 0, Modbus slave ID is 255, Modbus type is coil status, and Modbus address is 0. That is, when the first bit of the first byte of RPDO1 received by the PXB-6021 is 1, the Modbus IO module will turn on the relay. Otherwise, the Modbus IO module will turn off the relay. The RPDO parameter settings are shown in Figure 4.Application of PXB-6021: Transforming Modbus IO Modules into CANopen IO Modules

Figure 4 RPDO Parameter Configuration

Application of PXB-6021: Transforming Modbus IO Modules into CANopen IO Modules Configuration of CANManager for CANopen Software

CANManager for CANopen software is the management software for CANopen master stations, which can control and manage CANopen master devices and facilitate data exchange between CANopen master and slave devices.

First, open the CANManager for CANopen software, and import the EDS file of the PXB-6021 protocol converter, as shown in Figure 5.Application of PXB-6021: Transforming Modbus IO Modules into CANopen IO Modules

Figure 5 Import EDS

Then, click the “Start” button, followed by the “Search” button to search for CANopen slaves, as shown in the search interface in Figure 6. Once connected successfully, the USBCAN-E-P CANopen master card can exchange data with the PXB-6021 protocol converter.

Application of PXB-6021: Transforming Modbus IO Modules into CANopen IO Modules

Figure 6 Search for Slaves

Application of PXB-6021: Transforming Modbus IO Modules into CANopen IO Modules Control of Modbus IO Module

Check the self-increment option for RPDO1 and enable automatic sending, as shown in Figure 7.

Application of PXB-6021: Transforming Modbus IO Modules into CANopen IO Modules

Figure 7 Output RPDO

After completing the settings, the USBCAN-E-P CANopen master card will periodically send the first bit of the first byte of RPDO1, toggling between 0 and 1, achieving periodic control of the relay of the Modbus IO module, while also observing the relay indicator light flashing periodically, as shown in Figure 8.

Application of PXB-6021: Transforming Modbus IO Modules into CANopen IO Modules

Figure8 Effect Demonstration

At this point, the Modbus IO module has successfully connected to the CANopen network through the PXB-6021 protocol converter, and the PXB-6021 protocol converter and Modbus IO module form a “CANopen IO module”, realizing the functionality of a CANopen IO module, greatly enhancing the flexibility of using Modbus IO devices and providing a new option for the use of Modbus IO devices.

For more past articles, please click ” Read the original text “.

Application of PXB-6021: Transforming Modbus IO Modules into CANopen IO Modules

Application of PXB-6021: Transforming Modbus IO Modules into CANopen IO ModulesApplication of PXB-6021: Transforming Modbus IO Modules into CANopen IO ModulesApplication of PXB-6021: Transforming Modbus IO Modules into CANopen IO ModulesApplication of PXB-6021: Transforming Modbus IO Modules into CANopen IO ModulesApplication of PXB-6021: Transforming Modbus IO Modules into CANopen IO Modules

Leave a Comment