Setup: a Productivity2000 (P2K) PLC, a C-more EA9 HMI, a thermocouple in a water tank, and solid state relays switching cartridge heaters. The job is a five-step ramp/soak profile. The usual complaint is that the profile hangs, soaks too short, or overshoots every step. The PID gains are rarely the problem. The problem is almost always how the profile logic hands setpoints to the PID and how the PID output reaches the SSRs.
Skip the Quick Fixes That Fail
These are the fixes people try first. None of them restores a repeatable profile.
- Retuning the PID. If the setpoint jumps 100 degrees in one scan, no tuning stops the heaters from saturating and the integral term from winding up. You trade overshoot for a slow profile and still get neither right.
- Comparing PV equal to SP. A thermocouple value is a REAL. It will almost never exactly equal the setpoint, so an equality compare never goes true and the sequencer sits on step 1 forever.
- Timer-only steps. If each step advances on time alone, the soak clock starts the moment the step starts. The tank may still be 30 degrees cold. The soak finishes on paper and the product never saw the temperature.
- Driving the SSR bit from "PID output greater than zero". That turns a PID loop into an on/off thermostat with a very expensive calculation in front of it. Expect sawtooth temperature and overshoot.
- Moving the final target straight into the PID and calling it a ramp. That is a step change, not a ramp. The ramp rate becomes whatever the heater wattage allows.
Separate the Two Jobs: Profile and Heater Output
A ramp/soak controller is three blocks, not one:
- Profile generator decides the setpoint right now: which step, what target, whether the soak timer runs.
- PID compares that setpoint to the thermocouple PV and computes a 0-100% heat demand.
- Output stage converts that analog demand into on/off time on the SSR discrete outputs.
The workable pattern for the profile generator is a sequencer instruction feeding the PID setpoint. Each sequencer step loads a target temperature into the PID setpoint. The step advances on two conditions together: an event (a compare bit that says the PV has reached the setpoint) and a duration (the soak time). When the PV is at, for example, 100 and has held there for the soak time, move the next temperature into the setpoint and sequence to the next step.
Most broken programs fail at one of the three hand-offs: the event compare, the soak timer start, or the output stage.
Match the Symptom to the Cause
| Symptom | Likely cause | Fix |
|---|---|---|
| Sequencer never leaves step 1 | Equality compare on REAL PV and SP | Use a band compare (PV at or above SP minus a deadband) |
| Profile hangs on a high step | Target the tank cannot reach (water near boiling at atmospheric pressure, or undersized heaters) | Lower the target, check heater capacity, add a step timeout alarm |
| Soak ends before the tank is at temperature | Soak timer starts on step entry, not on in-band | Gate the soak timer with the in-band bit |
| Large overshoot at every step | Setpoint stepped instantly, integral windup while heaters are saturated | Ramp the working setpoint, use the PID's windup handling |
| Temperature sawtooth, SSR on or off for long stretches | SSR driven on/off, not time-proportioned | Build a time-proportioning output from the PID output |
| PV jumps, reads ambient, or reads backwards | Wrong thermocouple type configured, reversed TC leads, copper extension wire | Verify module channel config and TC wiring before touching logic |
Decide: Step-and-Soak or True Ramp
Pick the profile style before writing ladder. The two behave differently and the ladder differs.
| Style | How the setpoint moves | Use when |
|---|---|---|
| Step-and-soak | Sequencer loads the step target directly into the PID setpoint | Heat-up rate does not matter, only hold temperature and hold time |
| True ramp | A working setpoint climbs toward the step target at a fixed rate; the PID follows the working setpoint | The process specifies a rate (degrees per minute) or overshoot must be tight |
Step-and-soak is the simpler build and matches the sequencer-into-PID approach directly. If the recipe calls for a ramp rate, add the ramp generator described below between the sequencer and the PID setpoint. The sequencer still owns the step target and soak; the ramp only shapes how the PID setpoint gets there.
Ramp increment per update is derived from the rate and your update interval:
Build the Sequencer-to-PID Ladder
Create tags for: five step target temperatures, five soak times, the current step number, a working setpoint (REAL), an in-band bit, and a profile-running bit. Use descriptive names that match the HMI screens. Then build the rungs in this order:
- Load the step target. On each step change (one-shot on the sequencer step), copy that step's target temperature into the step-target tag.
- Generate the working setpoint. For step-and-soak, copy step target to working setpoint. For a true ramp, on a periodic one-shot add the increment to the working setpoint and clamp it at the step target (use subtraction and a limit when a step ramps down).
- Feed the PID. Move the working setpoint into the PID setpoint every scan. Scale the thermocouple channel into the PID PV in the same engineering units as the setpoint.
- Build the in-band bit. Compare PV against the step target, not the moving working setpoint: in-band is true when PV is within a deadband of the target. A heating step uses PV at or above target minus deadband.
- Run the soak timer. Enable an accumulating timer with the in-band bit and the profile-running bit. The accumulating type lets you pause the soak when PV drops out of band instead of restarting it.
- Advance the step. Advance the sequencer when the soak timer is done and in-band is true. Reset the soak timer on the step change.
- End the profile. After step 5, drop the profile-running bit, set the PID to a safe setpoint or manual zero output, and turn off the SSR outputs.
// Ladder logic in pseudo-code; replace <...> with your tag names
Rung 1: OneShot(<step changed>) -> MOVE <target[step]> to <step target>
Rung 2: <running> AND <ramp tick> -> ADD <working SP> + <increment>
-> LIMIT <working SP> to <step target>
Rung 3: always -> MOVE <working SP> to <PID setpoint>
Rung 4: <PV> >= (<step target> - <deadband>) -> SET <in band> else RESET
Rung 5: <running> AND <in band> -> accumulating timer, preset = <soak[step]>
Rung 6: <soak done> AND <in band> -> advance sequencer, reset soak timer
Rung 7: <step target not in band> for <timeout> -> SET <step timeout alarm>
Pitfalls at this stage:
- Deadband too tight: the loop hunts across the band edge and the soak timer pauses constantly. Size it to what the process tolerates, not to thermocouple resolution.
- Soak times in minutes on the HMI but timer presets in milliseconds or seconds: convert once, in one rung, and label the units on screen.
- Profile restarts after a power cycle mid-soak: decide whether the step number and soak accumulator should be retentive, and set the tags accordingly.
Time-Proportion the SSR Output
The PID produces a continuous demand. An SSR on a discrete output is either on or off. Convert with a fixed cycle period:
- Run a free-running timer that resets itself at the cycle period.
- Calculate on-time from the PID output every scan.
- Turn the SSR output on while the timer accumulator is less than the on-time.
- Force the output off when the profile is not running, the PID is in manual zero, or a TC fault is present.
SSRs tolerate a short cycle of a few seconds, which gives smooth heat delivery into a water tank. Check the PID instruction's output range in Productivity Suite help before writing the math; if it outputs raw counts rather than percent, scale first. If you split the cartridge heaters across several SSRs, drive them all from the same proportioned bit unless you are deliberately staging heat.
Wire the C-more EA9 Screens
- Recipe table: five rows of target temperature and soak time (plus ramp rate if used), writing into the PLC tag arrays. Lock edits while the profile is running.
- Status: current step, step target, working setpoint, PV, PID output %, soak time remaining, in-band indicator.
- Controls: Start, Hold (freeze working setpoint and soak timer), Abort (outputs off, profile reset).
- Alarms: step timeout, thermocouple fault, over-temperature.
Keep all logic in the PLC. The HMI only writes recipe values and command bits. If the EA9 loses communication, the profile must still finish or fail safe on its own.
Verify the Profile Before Production
- Check the PV. Compare the thermocouple reading to a reference thermometer in the tank at ambient and at one elevated temperature. Fix type configuration or wiring before anything else.
- Check the output stage. Put the PID in manual, set 25%, 50%, 75%. Watch the SSR LED or measure heater current; the on-time ratio must match.
- Dry-run the sequencer. Shorten soak times to seconds. Walk the PV through each step (or force the in-band bit in a test copy) and confirm the step advances only with in-band plus soak done.
- Run one real step. Trend PV, working setpoint, and PID output in Productivity Suite. Look for overshoot above the step target and for output pinned at 100% long after PV nears target (windup).
- Run the full five-step profile. Record actual soak durations versus recipe values and confirm the profile ends with heaters off.
- Test the failure paths. Open the thermocouple, press Abort, cycle power mid-soak. Each must leave the SSRs off or resume as designed.
FAQ
Can I use a sequencer instruction as the ramp/soak controller for a PID loop?
Yes. Load each step's target temperature into the PID setpoint and advance the step on an event (a PV-in-band compare bit) combined with a duration (the soak time). Add a separate ramp generator only if the recipe specifies a heat-up rate.
Does the PID output drive the SSR output directly?
No. Driving the SSR from "output greater than zero" turns the loop into on/off control.
Can I get help from AutomationDirect if the ramp/soak still misbehaves?
Stop and call AutomationDirect technical support if the thermocouple module reports a channel fault, the PID instruction rejects its configuration, or the CPU faults on download, because those point to configuration or hardware rather than ladder logic. Have the Productivity Suite project, the module configuration, and a trend of PV, setpoint, and PID output ready before you call.