Kc 0.75, Ti 180 seconds, derivative zero. Those are the gains this tank finishes on, and they come out of one bump test: valve steady at 32 percent, 58.0 degC in the tank, output stepped to 42 percent, 20 seconds before the PV moves, 70.0 degC when it settles. The loop is a 1756-L83E heating a water tank through a steam valve, PIDE in a 250 ms periodic task. Setup comes before tuning here, because scaling errors, a loop left in the continuous task and a backwards control action account for more bad loops than the gains ever do. The Siemens PID_Compact route is at the end.
What the loop looks like
| Item | This example |
|---|---|
| Controller | 1756-L83E, firmware 33.011, Studio 5000 v33 |
| PV | Pt100 on a 1756-IRT8I, tank temperature, 0 to 150 degC |
| CV | 4-20 mA to a steam control valve, 1756-OF8, 0 to 100 percent open |
| Instruction | PIDE in a Function Block routine |
| Task | Periodic task ProcessTask, 250 ms, priority 8 |
| Trend | FactoryTalk View SE trend, 1 second sample |
Two 250 ms periods is a fast loop for temperature. It is fine. A slow process tolerates a fast loop, never the other way round.
Step 1: Prove the field signals before you write logic
- Put the valve in manual and drive it to 0, 50 and 100 percent. Watch the mA on a meter at the valve terminals, not in the tag. A 4-20 mA output reading 4.02 mA at 0 percent is correct. Reading 0 mA means an open circuit or a card in the wrong mode.
- Read the raw PV while the sensor sits in a known bath or against a handheld. A Pt100 that reads 24 degC in a 22 degC room is fine. One that reads 850 degC has an open lead.
- Decide the control action on paper. More steam means hotter tank, so the output must rise when PV is below SP. That is reverse acting in the classic sense, and in Logix it is the setting where error is calculated as SP minus PV.
Scaling and the raw count arithmetic are the same as any analog input. If you need the conversion worked through, PLC PID control automation covers the signal path.
Step 2: Pick PID or PIDE
| PID (ladder) | PIDE (function block) | |
|---|---|---|
| Available in | Ladder, Structured Text | Function Block, Structured Text |
| Gains | Dependent by default: Kc, Ti in minutes per repeat, Td in minutes | Independent by default: PGain unitless, IGain in 1/minutes, DGain in minutes. Publication 1756-RM006 page 75 is explicit about it: with the independent form selected, the integral gain goes in as 1/minutes. The 1/seconds figure belongs to the classic PID instruction, not to PIDE, and mixing the two is why a loop tuned from a worked example lands sixty times off |
| Loop update | .UPD in seconds, must match the task period | Uses the actual task period, no separate setting |
| Bumpless auto/manual | Manual, takes care | Built in, plus program and operator ownership |
| Autotune | Separate tool | Built in on the PIDE faceplate |
On a new project use PIDE. The only reason to use the classic PID is a legacy program you are not allowed to restructure, or an SLC 500 and RSLogix 500, where the PID block is the only option and the setup is shown in RSLogix 500 PLC programming PID control example.
Step 3: Call the block from a periodic task
Create a periodic task at 250 ms, add a program, add a Function Block routine. If you prefer text, PIDE is callable from Structured Text in the same task:
(* ProcessTask, 250 ms periodic *)
TankPID.PV := Tank_Temp_degC;
TankPID.SPProg := Tank_SP_degC;
TankPID.PVEUMax := 150.0;
TankPID.PVEUMin := 0.0;
TankPID.CVEUMax := 100.0;
TankPID.CVEUMin := 0.0;
TankPID.ProgProgReq := HMI_Auto_Req;
TankPID.ProgOperReq := HMI_Manual_Req;
PIDE(TankPID);
Steam_Valve_pct := TankPID.CVEU;
Loop_In_Auto := NOT TankPID.ProgOper;
Never put a PID block in the continuous task. The continuous task period is whatever is left over after every periodic task has run, so it drifts with load. Derivative action on a drifting period produces noise that looks exactly like a bad sensor.
Step 4: Bump test, then calculate
Put the loop in manual with the tank at steady state.
- Note the steady CV and PV. In this case 32 percent open, 58.0 degC.
- Step the CV up by 10 percent, to 42 percent. Do not touch anything else.
- Watch the trend. Record the dead time before the PV starts moving, and the time to reach 63 percent of the final change.
Our tank gave 20 seconds of dead time, a final PV of 70.0 degC, and 180 seconds to reach 63 percent of the rise.
- Process gain Kp = 12.0 degC / 10 percent = 1.2 degC per percent
- Time constant tau = 180 s
- Dead time theta = 20 s
Using lambda tuning with lambda set equal to tau, which gives a loop that settles without overshoot:
- Kc = tau / (Kp x (lambda + theta)) = 180 / (1.2 x 200) = 0.75 percent per degC
- Ti = tau = 180 s
For PIDE with independent gains, enter PGain 0.75, IGain 1/180 = 0.0056, DGain 0. For the classic PID with dependent gains, enter Kc 0.75, Ti 3.0 minutes, Td 0.
Leave derivative at zero. On temperature loops with a decent sensor it buys almost nothing and amplifies every bit of electrical noise on the RTD leads.

Step 5: The same loop on an S7-1500
- In TIA Portal V18, add a Cyclic interrupt OB and set the cycle to 250 ms. OB30 is the default number.
- Drag PID_Compact from Technology → PID Control → Compact PID into that OB. TIA Portal creates the technology object and its instance DB.
- Open the configuration editor. Set Input to
RealorInput_PERif you are feeding the raw analog word, set Output_PER for a 4-20 mA card, and set the process value limits to 0 and 150. - Under Advanced settings → PID Parameters, untick Enable manual entry if you plan to autotune, or tick it and enter Gain 0.75, Ti 180 s, Td 0 s.
- Download, open Commissioning, and run Pretuning with the process steady. Fine tuning afterwards needs the PV already near setpoint.
PID_Compact reports problems in the ErrorBits DWORD. 16#0000_0001 means the input is outside the configured process value limits, which on a fresh project usually means you left the limits at the default 0 to 100 while feeding degC from a 0 to 150 sensor.
Field notes
Backwards control action on a chiller. A glycol loop drove the valve wide open every time the tank got cold. The integrator had copied a heating loop and left the error calculated as SP minus PV. Cooling needs the opposite. Symptom is unmistakable: the CV runs to a limit and stays there whichever way the PV moves. Flip the control action, retune, done in ten minutes once you know what you are looking at.
Update time that did not match the task. A PID in a ladder routine had .UPD set to 0.1 while the continuous task averaged 34 ms and spiked to 90 ms under load. Integral action ran roughly three times faster than intended, so the loop cycled with a 40 second period. We moved the routine to a 100 ms periodic task and left .UPD at 0.1. The oscillation stopped without changing a single gain.
Windup during a steam outage. Boiler down for two hours, PV 40 degC below SP, integral term accumulated the whole time. When steam came back the valve stayed at 100 percent for eleven minutes past setpoint and lifted the relief. PIDE limits the integral against CVEUMax and CVEUMin, but only if you actually set them. They were at the defaults.
Trend sampled too slowly to see the problem. A loop was reported as unstable, but the trend sampled at 30 seconds showed a smooth line. At 1 second the output was chattering between 40 and 60 percent from a noisy 4-20 mA input. Setting up the trend properly is half the diagnosis, and the settings are in PLC trend chart settings and monitoring.
Frequently asked questions
What starting gains should I use if I cannot bump the process?
Start with proportional only. Set the gain so a full-scale error moves the output about half of its range, integral off, and watch. If the loop is sluggish, double the gain. If it oscillates, halve it. Add integral last.
Why does my output jump when the operator switches to auto?
The block is not initialising the integral term to the current manual output. PIDE handles this itself. With the classic PID you have to set .SO to the current output and use the manual bit before you release it.
Can I run PID in the continuous task if the process is slow?
You can, and it often looks fine for months. It fails the day someone adds a message instruction or a big array copy and the continuous task period doubles. Use a periodic task.
Do I need derivative?
On flow and pressure, no. On temperature with a lot of dead time, a small amount can help, but only after proportional and integral are right and only with a filter on the derivative input.
How do I know the loop is actually tuned?
Step the setpoint 5 percent with the loop in auto. A tuned loop reaches the new value with at most one small overshoot and no continuing cycle. If it keeps ringing, lower the gain or lengthen the integral time.
Next step
Once the loop holds, build the operator side so the shift crew can see what it is doing. The function block environment used for PIDE and its faceplates is covered in Allen Bradley PLC function block programming, and alarm limits around the PV belong in PLC analog alarm ALMA. Barrel heater zones are the loops that most often need a thermocouple check on top of the tuning, and that job is in injection molding cycle, barrel zones and guard interlocks.