Teach you how to implement PID control in S7-1200

Publisher:RadiantExplorerLatest update time:2023-08-04 Source: elecfansKeywords:S7-1200 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

[Introduction] Share how to implement PID control in S7-1200.

Overview


[I] PID control

PID function is used to control the closed-loop process. PID control is applicable to physical quantities such as temperature, pressure and flow. It is the most widely used control method in industrial sites. Its principle is to set a given value for the controlled object and then measure the actual value, compare it with the given value, and send the difference to the PID controller. The PID controller calculates the result according to certain operation rules, which is the output value and sends it to the actuator for adjustment. P, I and D refer to proportion, integration and differentiation, which is a closed-loop control algorithm. Through these parameters, the controlled object can follow the changes of the given value and make the system stable, automatically eliminating the influence of various interferences on the control process.


【I】PID control of S7-1200

The number of PID controller loops provided by the S7-1200 CPU is limited by the CPU's working memory and the number of supported DB blocks. Strictly speaking, there is no specific limit, but in actual application, it is recommended that customers do not exceed 16 PID loops. Loop control can be performed simultaneously. Users can manually debug parameters or use the self-tuning function. Two self-tuning methods are provided for the PID controller to automatically debug parameters. In addition, STEP7 Basic also provides a debugging panel, so that users can intuitively understand the status of the controller and the controlled object. The PID controller function is mainly implemented by three parts: the loop interrupt block, the PID instruction block, and the process object background data block. When calling the PID instruction block, the user needs to define its background data block, and this background data block needs to be added in the process object, which is called the process object background data block. The PID instruction block and its corresponding process object background data block are used in combination to form a complete PID controller. Since Software Portal V13, S7-1200 with firmware 4.0 or higher can use the PID_Compact V2.2 instruction. For S7-1200 V4.0 and above, and TIA Portal V13 SP1 and above, you can use S7-PLCSIM V13 SP1 to simulate PLC programs, but it does not support the simulation of technological functions (high-speed counters, motion control, PID regulation).


(1) The following table shows which CPU each version of PID_Compact can be used for:

CPU FW PID_Compact
S7-1200 ≥ V4.x V2.2
V1.2
S7-1200 ≥ V3.x V1.2
V1.1
S7-1200 ≥ V2.x V1.2
V1.1
S7-1200 ≥ V1.x V1.0

(2) Typical CPU processing time of PID_Compact V2.0 technology object (depending on the CPU type):

CPU Typical CPU processing times (PID_Compact V2.x)
CPU 1211C ≥ V4.0 300 µs
CPU 1215C ≥ V4.0 300 µs
CPU 1217C ≥ V4.0 300 µs

(3) Memory requirements for the background data block of the PID_Compact V2.0 technology object:

Classification Memory requirements for instance data blocks of PID_Compact V2.x
Load memory requirements About 12000 bytes
Total work memory requirement 788 bytes
Retentive work memory requirements 44 bytes

ef9eee5a-cb3b-11ed-bfe3-dac502259ad0.jpg

efc174b6-cb3b-11ed-bfe3-dac502259ad0.jpg

f016a97c-cb3b-11ed-bfe3-dac502259ad0.jpg

Characteristics of analog closed-loop control system-PID control:

It does not require a mathematical model of the controlled object, has a simple structure, is easy to implement, is easy to use, and has strong flexibility and adaptability.

f0c52f4c-cb3b-11ed-bfe3-dac502259ad0.jpg

f0f49b92-cb3b-11ed-bfe3-dac502259ad0.jpg

f1210b46-cb3b-11ed-bfe3-dac502259ad0.jpg

f14c8406-cb3b-11ed-bfe3-dac502259ad0.jpg

f176e9da-cb3b-11ed-bfe3-dac502259ad0.jpg

f1b40004-cb3b-11ed-bfe3-dac502259ad0.jpg

f1ed6f4c-cb3b-11ed-bfe3-dac502259ad0.jpg

f21b4a48-cb3b-11ed-bfe3-dac502259ad0.jpg

f2457c1e-cb3b-11ed-bfe3-dac502259ad0.jpg

f276e27c-cb3b-11ed-bfe3-dac502259ad0.jpg

f2a0c79a-cb3b-11ed-bfe3-dac502259ad0.jpg

f2ddf516-cb3b-11ed-bfe3-dac502259ad0.jpg

f3298468-cb3b-11ed-bfe3-dac502259ad0.jpg

f361c396-cb3b-11ed-bfe3-dac502259ad0.jpg

f3825bec-cb3b-11ed-bfe3-dac502259ad0.jpg

f3ae9c84-cb3b-11ed-bfe3-dac502259ad0.jpg

f3dc58fe-cb3b-11ed-bfe3-dac502259ad0.jpg

f41f6f18-cb3b-11ed-bfe3-dac502259ad0.jpg

f45299ce-cb3b-11ed-bfe3-dac502259ad0.jpg

f483eef2-cb3b-11ed-bfe3-dac502259ad0.jpg

Tuning PID controller using debug window - Functions of debug window

1. Use the "First Startup Self-Tuning" function to optimize the controller

2. Use the "self-adjustment during operation" function to optimize the controller to achieve the best adjustment

3. Used for trend view to monitor current closed-loop control

4. Test the process by manually setting the controller output value

f5390198-cb3b-11ed-bfe3-dac502259ad0.jpg

f5714788-cb3b-11ed-bfe3-dac502259ad0.jpg

f5b2f37c-cb3b-11ed-bfe3-dac502259ad0.jpg

f5de23c6-cb3b-11ed-bfe3-dac502259ad0.jpg

f6236936-cb3b-11ed-bfe3-dac502259ad0.jpg

f65de6c4-cb3b-11ed-bfe3-dac502259ad0.jpg

f69a4a10-cb3b-11ed-bfe3-dac502259ad0.jpg

f6d878ee-cb3b-11ed-bfe3-dac502259ad0.jpg

f703e0f6-cb3b-11ed-bfe3-dac502259ad0.jpg


Keywords:S7-1200 Reference address:Teach you how to implement PID control in S7-1200

Previous article:What does differential motor mean? What does differential motor mean?
Next article:Relationship between field current and armature current

Recommended ReadingLatest update time:2024-11-16 15:00

How to use Siemens S7-1200 to control the start and stop and output frequency of the G120 inverter via PROFINET
Siemens G120 is a frequency converter with modular design, mainly consisting of two parts: control unit and power unit. The control unit supports commonly used fieldbus protocols such as ModbusRTU, USS, Profibus-DP, ProfinetIO, CANopen, etc. The power unit supports a power range of 0.35kW to 250kW. There is also an
[Embedded]
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号