[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 |
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.
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
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
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Can RTthread be ported to nrf51822?
- I want to control the on and off of NMOS through a 3.3V microcontroller
- Components Science Popularization: Pressure Sensor
- What wattage is this resistor?
- Displaying the ESP32's REPL on the ST7735 LCD
- A brief introduction to commonly used wireless technologies
- Disassembly of the SPX01W power bank that supports wireless charging
- (1) Unboxing experience based on the STM32L4R9 MEMS sensor board (IKS01A3)
- EEWORLD University ---- Razavi Analog Integrated Circuit Tutorial (English)
- About the uboot compilation problem of am335x