SLC PID Basics
The idea of a PID is to change the Process Variable (PV) to the Set Point (SP) value by changing a Control Variable (CV).
All three of these values have a range from 0 – 16,383. An example of a PID application would be controlling the
temperature to a Set Point by slowing down or speeding up fan.
How this is accomplished is that the PV is feedback into an equation that has proportional, integral and derivative values
that are used in calculating the CV value that is in turn sent out the controller to the actual output/device. How often the
equation is executed is set by the user. In the example below we set the PID to execute in TIMED mode and we set a
loop update time to 1.00 seconds. This means the PID instruction found in Ladder 2 Program file will update with new
CV values every second.
The goal of this exercise is to demonstrate the basic set up of the PID instruction and to demonstrate that PV, SP and CV
truly use the range of 0 to 16,383. In this example the only hardware used is the SLC controller. In other words nothing is
wired to CV, SP or PV. We will manually manipulate these values using RSLogix 500.
Enter the following PID instruction in Ladder 2 and use the PID Setup values as shown. Here we have a modest set of
gains and will execute the PID equation and set the CV value every 1 second. Make sure N7:0 and N7:1 are zero. N7:0 is
the PV. And N7:1 is CV. Notice that we have set the SP to 8000. Notice that the min and max values for the SP are 0 to
16383.
PV CV
Download, go to run mode, and observe N7:1 (CV). We are asking PV to go to 8000 (SP=8000). However without this
system being wired to anything the PV will always be zero. So the PID equation will continue to drive the CV value to its
largest value in the attempt to get PV to change. So we will see N7:1 (CV) increase every second until we hit 16383.
Now let’s do another example.
Go offline.
Let’s set the SP and PV to 6000. Set the SP using the PID Setup. Set the PV to 6000 by setting N7:0 to 6000 by using the
data table monitor.
Now download and go to run mode. Since PV=SP we are in the perfect condition, so no change should be made to CV
(N7:1). Let’s observe what happens. And sure enough N7:1 stays at 0.
While it is running, changed N7:0 to 4000 which means PV doesn’t equal SP so the PID equation will calculate a non-zero
number for CV to try and make the PV go to 6000 (which is the SP). Again you see the CV (N7:1) begin to increase. It will
continue to increase and stop at 16383 because as much as CV tries to change PV it can’t because the hardware isn’t
wired to anything.
Now that you have the basics, vary the values for Kc and Ti for the gains in the equation. A larger value of Kc will get you
a larger initial value of CV. A larger value of Ti will increase subsequent CV values. Manipulating gain values is called
tuning and is not subject of this document. Tuning is often an entire college class.