FB41CONT_C function and parameter setting of Siemens S7-300PID - Database & Sql Blog Articles

Brand AVX TPSE226M035R0125 Low impedance tantalum capacitor AVX 22
Photocoupler

Now, we are using the Siemens S7-300 (CPU315) to perform PID control on the rectification system. The 4-20mA signal is input via the AI module, including both the saturated reactor control current feedback from the A and B cabinets, as well as the DC current feedback from units A and B. The CPU calls the PID function block to achieve automatic closed-loop control, and finally, the AO module outputs a 4-20mA signal to the steady current system for both A and B cabinets.

During the implementation, some key issues were identified:

  1. Which specific PID function blocks in S7 should be called? For example, can FB41 be directly called in OB1?
  2. How to configure the input and output parameters of the standard PID block FB41? What is the difference between PV_PER, SP_INT, and PV_IN?
  3. How to set the GAIN, TI, and TD values correctly?
  4. How to use MAN_ON and PVPER_ON? Should these be written directly into the inputs of FB41?

In principle, the execution cycle of the PID should match its sampling period. This ensures that the mathematical model aligns with the physical process. That's why FB41 should be called periodically in OB35, and the period of OB35 must match the sampling period of FB41.

However, it's also possible to call FB41 in OB1 or other FC/FB functions. In such cases, it's better to use the scan period of OB1 as the sampling period for FB41.

In my experience with PID control for constant current and pressure in pipeline systems, I've used FB41 continuously in FC without any conditions, and the results were satisfactory. I believe that for applications with lower precision requirements, simple calls can still work effectively.

The parameter settings for FB41 are very flexible and can be adjusted based on personal preference or application convenience. Here’s a common approach:

  • MAN_ON: Activates the manual adjustment mode for the setpoint. It can be triggered by a switch between manual and automatic modes.
  • PVPER_ON: Enables the "PERIPHERAL" input/output parameters, which treat the feedback value as an integer between 0 and 27648. This allows direct reading from the AIW channel and direct output to AQW. This setting is useful when you want to bypass scaling and use raw data.
  • MAN: Manual setpoint, valid only when “MAN_ON = 1”.
  • CYCLE: Sampling period. It should match the execution cycle of FB41 to ensure consistent timing.
  • SP_INT: Setpoint value. It should match the unit of the feedback value. To avoid errors, it's recommended to convert SP_INT to a percentage between -100.0 and 100.0% before inputting it into FB41.
  • PV_PER: Feedback value, taken directly from the AIW channel. Only valid when “PVPER_ON = 1”.
  • GAIN: Proportional gain, which determines how strongly the controller reacts to the error.
  • TI: Integration time, which affects how quickly the controller responds to accumulated error.
  • TD: Derivative time, which predicts future errors based on the rate of change of the error.
  • LMN_PER: Output value of the PID, directly mapped to the AQW channel.

Once these parameters are properly configured, the basic PID control can be achieved. Additional settings like dead zone, output limits, and anti-windup can be added depending on the application needs.

Using the built-in PID assignment tool in STEP7 makes the configuration much easier and faster. You can graphically assign parameters, and the settings will be saved directly in the corresponding instance data block. There's no need to manually assign FB41 when calling it.

Weatherproof/Waterproof Type F Outlets

"Waterproof Type F Outlets Black,Waterproof Type F Outlets,Waterproof Outlet Plug,Waterproof Exterior Outlet "

Yang Guang Auli Electronic Appliances Co., Ltd. , https://www.ygpowerstrips.com

This entry was posted in on