How to Program a Basic PID Loop in ControlLogix

PLC programmers often have to deal with control loops in automation programming to control pressure, temperature, flow rate, etc. The programmer needs to control the feedback process variable while setting a target point. This doesn’t happen in one day. It’s better if you get ControlLogix PLC Training to make sure the coding goes smoothly.

Understanding PID control loop

When programmers need to make some corrective effort to apply and implement on a process, they use the PID control loop. It helps to drive the measurable process variable as close to the target point. This stage will consist of two parts: the actuator used by the controller and the sensor that helps to measure the results.

Programming with the basic PID loop in Controllogix

Launch the Controllogix program on your desktop by double clicking on it. Your objective now is to create a new project. So, select the controller you prefer and rename it. Hit Next and keep following the instructions on the screen until it prompts Finish.

• Creating the new task

Your first job is to create a new Task that helps to develop a new Routine. So, head over to the Program menu and create a scheduled task. Right-click on Tasks, followed by New Task. Rename the New Task. Try and keep a simple name. You will notice that Controllogix automatically assigns a period for the task. This often depends on the sample rate from the PID loop. You can manually change the period for better functioning.

• Creating the new program

If you are happy with the period for the task, move over to creating the new program. Right-click on the PID Control and select New Program from the list. You get a menu from where you select Add and then go to the Program part. You can rename the program and click on OK to continue.

• Creating the new routine

Your third step to program a basic PID loop in Controllogix is creating a new routine. Select and right click on the newly-created program. You will find Add in the list. Click on it to continue with the new routine. Again, rename the new routine. Also, make sure that the routine type is set to Function Block Diagram. If all’s well, click on OK. Your new routine will get added to the Controller Organizer. Find this organizer on your left pane of the new window. You can also open it by double-clicking.

• Adding the routine block to the programming environment

This is one of the most critical parts of PID loop in Controllogix. So, you created a new task, new program, and a new routine. Now, go to the Process Tab in the Controllogix library and add the routine on the sheet.

You need to configure the routine block to open its properties. Double click on the routine block and go to the General Configuration tab. It is better to use the default configuration unless you are an expert. But, make sure you follow the conditions below:

• For Timing, always use the Periodic Mode.

• For Control Action, always set the function to E.

• For Calculate or understand the Proportional parameter, always set the derivative term as PV.

The control variable limits usually use the same temperature that the engineering units use. So, that is one relief for the programmers. They don’t have to tweak with these settings anymore. Once you go through the settings, confirm everything and hit OK.

There are more detailed functions of Controllogix, but if you want to learn the basics of PID loop, don’t forget to follow this guide.

Tom Archibeque
Tom Archibeque
Tom Archibeque is the owner and trainer at Control Logic Training. Tom is an experienced Electrical Controls Engineer, providing Rockwell Automation control system integration, PLC programming and training. Working with numerous packaging manufacturing machine builders, keeping current with today’s PLC programming techniques.

Author: Tom Archibeque

Tom Archibeque is the owner and trainer at Control Logic Training. Tom is an experienced Electrical Controls Engineer, providing Rockwell Automation control system integration, PLC programming and training. Working with numerous packaging manufacturing machine builders, keeping current with today’s PLC programming techniques.