Share this

Example of MODBUS/RTU communication between Schneider PLC and ABB frequency converter

2026-04-06 05:10:13 · · #1

This example program uses a Schneider Electric CODESYS platform PLC M218 to communicate with an ABB ACS510 frequency converter via MODBUS/RTU. The PLC writes the operating frequency and reads the actual frequency and motor current. The converter's start and stop are hard-wired. You can think about why this is done. PS: I have already used this program in a project and it is definitely feasible. You can send me a private message with "modbus" to get it. Software platform: Somachinev4.3 .

1 wiring

Modbus wiring is relatively simple: positive to positive, negative to negative. Even if you connect it incorrectly, it won't damage the hardware. Let's look at the instructions in the manual.

Figure 1. MODBUS wiring diagram for ACS510 frequency converter

Figure 2. TM218 PLC Modbus Wiring

As shown in the figures above, Figure 1 is the terminal diagram of ABB, and Figure 2 is the terminal diagram of Schneider Electric. Schneider Electric PLCs generally have two independent serial ports, and here we use serial port 2.

It's important to note that in the diagram, the yellow highlighted area indicates that for ABB, B is positive and A is negative, while for Schneider Electric, A is positive and B is negative. Therefore, the wiring should be A to B , and B to A.

2 configurations

Configuration refers to setting various communication-related parameters, mainly address, baud rate, and checksum.

Figure 3 PLC Side Setting Parameters

As shown in Figure 3, locate Serial Line 2 in the PLC's hardware tree, double-click Modbus_Manager ( the part highlighted in yellow in the figure), and open the PLC's Modbus configuration.

Figure 4 Schneider PLCMODBUS Configuration

As shown in Figure 4, the yellow highlighted area indicates that the communication mode is set to RTU. We need to use the PLC to read the frequency converter, so the PLC is the master station. The red circle indicates the communication parameter settings.

3. Inverter parameter settings

The main parameters to be set for the frequency converter are as follows:

Figure 5. ABB Inverter Parameter Settings

The key to setting the inverter parameters is the part circled in red. You must ensure that it is consistent with the PLC side; otherwise, you will not be able to communicate.

4. Programming

Here's the key point: the program mainly uses three function blocks, ADDMREAD_VARWRITE_VAR, whose functions are address translation, writing variables, and reading variables, respectively.

ADDM is used to convert MODBUS addresses into addresses that the PLC can recognize. This function block can be considered as an interaction between the user and the PLC's underlying layer, and does not need to be understood. Moreover, this seems to be a mechanism unique to Schneider Electric, because this function block is also used in Schneider Electric's Unity (non-CODESYS platform).

READ_VAR and WRITER_VAR are the ones we actually use; their function is to write to and read from variables, allowing us to see the program.

Figure 6. MODBUS communication program written in CFC

Figure 6 shows the complete program. The program is quite large, so it might take some effort to read. The yellow highlighted section is the program's start button; the program will automatically execute when the variable Com_En generates a rising edge. The large red circle at the end is the result we need. The data read or written is stored in an array, which is very convenient when the data you are interacting with is continuous.

In essence, the core of CFC (Computer-Focused Logic) lies in its ability to move freely, much like a circuit diagram. In communication programs, where functional blocks need to communicate, intermediate variables are required for data transfer. Directly using wires eliminates the hassle of creating these intermediate variables. European PLCs also handle communication simply, requiring no complex programming. Configuration parameters are set via configuration; simply specifying the address and quantity within the functional block allows for easy data exchange. To make it clearer, I've enlarged the program in sections.

Looking at the three diagrams above, the smaller red circles represent the functional blocks used, while the larger red circles represent the communication results.

In summary, MODBUS is a cost-effective communication solution that is worth trying. Its advantages over analog signals are obvious: it saves on cabling, transmits larger amounts of information, effectively reduces costs, and enhances the overall quality of equipment.

This program is genuine and feasible; you can send a private message with "modbus" to obtain it. Of course, the program only performs basic communication processing and doesn't handle process optimization. You only need to add the necessary process optimizations before using it. For multiple frequency converters, a polling method should be used.

Read next

CATDOLL EQ (Sleepy Q) 108CM

Height: 108cm Weight: 14.5kg Shoulder Width: 26cm Bust/Waist/Hip: 51/47/59cm Oral Depth: 3-5cm Vaginal Depth: 3-13cm An...

Articles 2026-02-22