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

Introduction

In actual work sites, PLCs are often used to control inverters. There are several ways for PLC to control inverters, such as terminal control, analog control, and communication control. Among these, communication control has certain advantages over the first two methods, such as the ability 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, a frequency of 30HZ can be set for the inverter.

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

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

Figure 1-0

01
Wiring and Parameter Settings for V20 Inverter

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

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

Figure 1-1

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

Figure 1-2

(2) Parameter Settings

The inverter directly selects the connection macro CN011. After selection, the default settings are shown in Table 2-3.

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

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 Study

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 ready to run, stop, and other values correspond as per the table.

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

Table 2-5

03
Program Design

(1) OB1 Program

Program segment 1 mainly calls the Modbus initialization instructions, setting parameters such as baud rate and parity. At the same time, one scan 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 Study

Program segment 2 mainly implements writing commands and frequency to control the inverter. Program segment 3 uses completion and error bits to achieve polling, and other network segments use the same polling method.

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

Program segment 4 implements reading the control word and frequency.

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

Program segment 6 implements writing acceleration and deceleration time settings.

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

Program segment 8 implements reading bus voltage and running current.

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

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

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

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

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

(2) FC2 Program Design

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

(3) FC1 Program Design

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

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 Case StudySiemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case StudySiemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case Study
Siemens S7-1200 PLC and V20 Inverter Modbus RTU Communication Case Study

Leave a Comment