# How to configure PID controller in Siemens PLC?

**URL:** <https://forumautomation.com/t/how-to-configure-pid-controller-in-siemens-plc/2537>\
**Category:** PLC (Programmable Logic Controllers)\
**Tags:** pid\
**Created:** [October 30, 2017, 5:13pm UTC](https://forumautomation.com/t/how-to-configure-pid-controller-in-siemens-plc/2537 "2017-10-30T17:13:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sivaranjith](https://forumautomation.com/letter_avatar_proxy/v4/letter/s/ba9def/32.png) [@sivaranjith](https://forumautomation.com/u/sivaranjith)\
**Post date:** [October 30, 2017, 5:13pm UTC](https://forumautomation.com/t/how-to-configure-pid-controller-in-siemens-plc/2537/1 "2017-10-30T17:13:13Z")

</div>

Open TIA portal on your computer.

 ![configure PID in PLC](https://cdn.forumautomation.com/original/1X/bb2c3bfa2c45eb9a9383879a839190165089f91f.png)

- Open the project view and start your PLC program.

 ![configure PID in PLC](https://cdn.forumautomation.com/original/1X/c848fbb22738ef3f7ad74f27e6c9c531b7f55177.png)

- Open your project tree \> click the **Program block** \> select the ‘Add new block’ \> **Select Organization Block** \> Select **cyclic interrupt**. Now cyclic interrupt will be added to your program block.

A cyclic interrupt OB allows you to start a program at a periodic interval, independently of cyclic program execution.

\<img src=“[//forum-automation-uploads.sfo3.digitaloceanspaces.com/original/1X/81b743685838171e558b6d73207cb060659830bc.png](https://cdn.forumautomation.com/original/1X/81b743685838171e558b6d73207cb060659830bc.png)” width=“500” height=“295"alt=” configure PID in PLC"\>

- Select your network line \> Add an Empty box to the line \> Click on the empty box to set a name \> Type PID and select the **PID compact** from the list.

You can enlarge your box to see more options.

 ![configure PID in PLC](https://cdn.forumautomation.com/original/1X/4c5b085211df53dfcb7577bc07825f3a3cba9963.png)

Double click on the box so that you can see the description for the PID block.

- Set your input, output and set manual setpoint as the manual value. Set ‘reset’ as PID reset.

- For Mode active and Mode at the bottom of the input line, you can verify the description once again.

A Mode specifies the operating mode to which PID\_Compact is to switch. Options are: Mode = 0 ; inactive Mode = 1 ; Pretuning Mode = 2 ; Fine tuning Mode = 3 ; Automatic mode Mode = 4 ; Manual mode

- Select suitable mode in the ‘Mode active’.

- Select output in output count or output percentage. Set all the data in the box properly.

Again go to project tree, to get the option for configuring the PID.

 ![configure PID in PLC](https://cdn.forumautomation.com/original/1X/0184e31653bd24fe79f8b07d94dcf1e84706fba5.png)

Project tree \> Technology objects \> PID\_compact \> configuaration

- You will have a new window with heading “Control type”  
Click control type \> change the general to specific control PID like temperature, pressure, flow etc. \> select the unit for the variable \> also select the Mode.

 ![configure PID in PLC](https://cdn.forumautomation.com/original/1X/f0b6607b7784a4b6b0b5952c1bec98041924073b.png)

- Select **PID parameters** from basic settings \> Now you can set the Gain for each control action type in the PID.

Change the parameter and check on the PID\_compact, whether it is changing in it or not.

Now you can compile and check the correctness of the program.

From the top of the PID compact box, select the right end option to get the graph of the program running.

 ![configure PID in PLC](https://cdn.forumautomation.com/original/1X/de231dace105d751968b520ac4464b342b1cdcaf.png)

You can put the parameter screen, Compact screen, and graph in different tabs.

[WHAT IS RATIO CONTROL ?](https://automationforum.co/2018/02/what-is-ratio-control.html)
