Open TIA portal on your computer.
- Open the project view and start your PLC program.
- 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="/uploads/default/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.
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.
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.
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.
- 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.
You can put the parameter screen, Compact screen, and graph in different tabs.