Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case

Introduction

In practical work sites, PLCs are often used to control inverters. There are several ways to control inverters via PLCs, such as terminal control, analog control, and communication control. Among these, communication control has certain advantages over the first two methods, such as being able to read multiple data from the inverter with just one communication cable.

Control Requirements

① In manual mode, the inverter can be controlled to jog forward or reverse.

② In automatic mode, the inverter can be set to 30Hz frequency.

③ The status, frequency, DC bus voltage, and operating current of the inverter can be read; acceleration and deceleration times can be set, as shown in Figure 1-0.

Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case

Figure 1-0

01
V20 Inverter Wiring and Parameter Settings

(1) Wiring, as shown in Figures 1-1 and 1-2.

Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case

Figure 1-1

Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case

Figure 1-2

(2) Parameter Settings

Select connection macro CN011 directly on the inverter, and the default settings after selection are shown in Table 2-3.

Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case

Table 2-3: Connection Macro CN011 Parameter Settings

02
Common Registers and Control Word Descriptions for V20 Inverter

(1) Refer to the V20 inverter manual for register descriptions, as shown in Table 2-4.

Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case

Table 2-4

(2) Control word description, as shown in Table 2-5.

This mainly explains the meaning of the value in Modbus address 40100: writing 16#047E to address 40010 represents running preparation and stop; the meanings of other values are as per the table comparison.

Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case

Table 2-5

03
Program Design

(1) OB1 Program

Program segment 1 mainly calls the Modbus initialization instruction, setting parameters such as baud rate and parity. At the same time, one scanning cycle after power-up writes the control word 16#047E to prepare for starting the inverter.

Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case

Program segment 2 mainly implements writing commands and frequency to control the inverter. Program segment 3 uses completion bits and error bits for polling; other network segment polling methods are the same.

Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case

Program segment 4 implements reading the control word and frequency.

Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case

Program segment 6 implements writing the acceleration and deceleration time settings.

Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case

Program segment 8 implements reading the bus voltage and operating current.

Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case

Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case

Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case

Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case

Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case

(2) FC2 Program Design

Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case

(3) FC1 Program Design

Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case

Source: Jicheng Training Network, Author: Guo Biao, Reproduction without permission is prohibited~

64 Siemens PLC E-books
Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication CaseSiemens S7-1200 PLC and V20 Inverter Modbus RTU Communication CaseSiemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case
Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case

Leave a Comment