Troubleshooting
Why a MicroLogix 1000 PID control loop does not fit a solenoid valve
Short answer
The MicroLogix 1000 has no PID instruction, and a refrigeration solenoid valve is a two-state device that cannot accept a proportional output anyway. The right fix is ladder on/off control: cut-in and cut-out comparisons with a 2 to 3 degree differential, an anti-short-cycle timer and a sensor-fault branch that forces the output off.

On this page
- Does the MicroLogix 1000 have a PID instruction?
- Why can't a proportional output drive a solenoid valve?
- What does on/off control with a differential actually do?
- How do I build the differential logic in ladder?
- What does the worked example look like in numbers?
- How long should the anti-short-cycle timer preset be?
- What sensor-fault protection does the output need?
- When does a refrigeration box genuinely need PID?
- Questions asked
A MicroLogix 1000 has no PID instruction, so the loop you are picturing cannot be programmed on it. For a refrigeration solenoid that is not a loss: a solenoid valve is open or shut, so it cannot accept a proportional output in the first place. The correct design on this processor is on/off control built from two comparisons and a latch, with a 2 to 3 degrees C differential to start, an anti-short-cycle timer and a sensor-fault branch. This article gives you that logic, a worked example with real numbers and the bench test that proves it before refrigerant goes in.
Does the MicroLogix 1000 have a PID instruction? #
No. The PID instruction is not in the MicroLogix 1000 instruction set, so a loop built on this processor has to be assembled from arithmetic and comparison instructions or moved to a controller family that supports PID natively. This is not a firmware revision issue or a missing option module: the instruction simply does not exist on this processor, so it never appears in the instruction picklist.
On larger Allen-Bradley controllers the PID instruction exists and its data lives in a structured PID file addressed by file number, element and field, with each field having a defined default data type. Knowing that matters for two reasons: it confirms the loop infrastructure you would be hand-building on the MicroLogix 1000 is real and standardized elsewhere, and it tells you where to look if you move the project to a controller that has the instruction. Related reading: the DH-485 link between a MicroLogix 1000 and a PanelView 500-class operator interface, and the DF1 message instruction when two PLCs need to share data.
Why can't a proportional output drive a solenoid valve? #
Because the valve has exactly two states, and a PID control variable is a continuous value. A PID calculation produces a control variable that needs somewhere graded to land: an analog output driving a valve positioner, a drive speed reference, or a time-proportioned discrete output.
Time proportioning is the only path from a control variable to a plain coil. You take the output as a percentage, convert it to on-time inside a fixed cycle period and pulse the output. That works for an electric heater. It is hostile to a refrigeration compressor, which needs a minimum off time for pressures to equalize and a minimum run time to return oil. Pulse the solenoid at whatever period the loop math wants and you will short-cycle the compressor. So even if you hand-built the PID arithmetic in integer ladder, you would still have to wrap it in minimum-on, minimum-off and lockout timers — at which point you have already written most of a differential controller and gained nothing.
What does on/off control with a differential actually do? #
It energizes the solenoid when the box warms to the cut-in point and de-energizes it when it cools to the cut-out point, and the differential is the gap between those two temperatures. The gap is what stops chatter. Without it, sensor noise around a single switching point cycles the output every few seconds.
The differential has to come from the thermal behavior of the box, not from a universal rule. Too tight and you short-cycle; too wide and product temperature swings. A 2 to 3 degrees C differential is a normal starting point for a medium-temperature box; measure the actual pull-down and drift rates and adjust from there. Refrigeration convention is cut-in above setpoint, cut-out at or below setpoint.
How do I build the differential logic in ladder? #
Two comparison instructions and one latch carry the whole strategy. Follow these steps:
- Scale the temperature sensor into a word in the integer file. Work in tenths of a degree so a setpoint of 38.5 degrees C reads 385, with no floating point involved.
- Put the setpoint and the differential in two integer words, not as constants inside the comparison instructions, so a technician can trim them without a download.
- Compute cut-in as setpoint plus differential, and cut-out as the setpoint itself.
- Latch the solenoid output with a GRT of the process value against cut-in.
- Unlatch it with an LEQ of the process value against cut-out.
- Gate the latch rung with an anti-short-cycle timer started on the falling edge of the output.
- Add the sensor-fault branch described in the next section, forcing the output off and setting an alarm bit.
Because an output set with a latch instruction is retentive, add a first-scan unlatch so the system does not come back from a power cycle with the solenoid already open.
What does the worked example look like in numbers? #
For a medium-temperature box at a setpoint of 38.5 degrees C with a 2.5 degrees C differential, all values in tenths:
- Setpoint word: 385 (38.5 degrees C).
- Differential word: 25 (2.5 degrees C).
- Cut-in: 385 + 25 = 410, so the solenoid latches on when the process value rises above 410 (41.0 degrees C).
- Cut-out: 385, so the solenoid unlatches when the process value falls to 385 (38.5 degrees C) or below.
- GRT rung: process value greater than 410 sets the latch. LEQ rung: process value less than or equal to 385 resets it.
Bench proof: force the process value word through the range in the data table and confirm the output sets at 411 and above and resets at 385 and below — exactly one tenth-degree of hysteresis band edges, nothing in between. If either edge lands one tenth off, your comparison operand or scaling arithmetic is wrong, and it is far easier to find on the bench than in a charged box.
How long should the anti-short-cycle timer preset be? #
The preset is the compressor's minimum off time, and it comes from the compressor or condensing-unit manufacturer's data sheet — not from the controller. A commonly used example value for a small medium-temperature condensing unit is 5 minutes; use the figure printed for your machine. The timer starts on the falling edge of the solenoid output, and its done bit gates the latch rung, so even if the process value rises above cut-in immediately after a cut-out, the output stays off until the preset expires.
Verify it on the bench before the box is charged: force the process value high right after a cut-out and watch the output stay off for the full preset. An anti-short-cycle timer that does not actually block the latch is the fault that burns compressors.
What sensor-fault protection does the output need? #
A branch that forces the solenoid off and sets an alarm bit when the raw analog word sits at or beyond the scaling limits. An open sensor that reads full-scale cold will otherwise hold the solenoid open indefinitely and run the box down without limit.
Test it both ways at the terminal block: break the sensor circuit and confirm the output drops off and the alarm bit sets, then reconnect and confirm the logic recovers on its own. While you are in the box, check the sensor against an independent calibrated probe in the same air stream — a loop trimmed around a 2 degree sensor offset carries a permanent 2 degree error. Sensor placement dominates everything: a probe in return air, on the evaporator coil and against the box wall read three different temperatures, so move the sensor before you touch the logic.
When does a refrigeration box genuinely need PID? #
Only when the final control element can accept a graded command: an electronic expansion valve, a variable-speed drive on the compressor, or hot gas bypass for modulating capacity. If the box cannot hold setpoint with the solenoid open continuously, that is a capacity, charge, superheat or airflow problem, and no control algorithm will fix it — the temperature wanders and never settles because the machine, not the logic, is mismatched to the load.
If you have that genuine analog requirement, move to a controller whose instruction set contains PID natively, or use a dedicated loop controller, rather than hand-rolling proportional-integral arithmetic in 16-bit integer ladder with scan-time-dependent sampling. Keep the on/off differential design for the solenoid stages it fits; most single-solenoid boxes are served better by it than they would be by a tuning exercise they cannot use.
Questions asked
Why work in tenths of a degree in the integer file?
Tenths give resolution without floating point, which the MicroLogix 1000 does not give you comfortably in 16-bit integer math. A setpoint of 38.5 degrees C becomes 385 in N7, the differential becomes a single-digit number instead of a decimal, and every comparison instruction stays integer. Check that your scaling multiply does not produce an intermediate value above 32767; reorder the multiply and divide if it does.
Why put the setpoint and differential in data table words instead of constants?
If the cut-in and cut-out points are constants buried inside comparison instructions, every seasonal trim becomes a programming edit and a download. Two words in N7 let a technician adjust the setpoint and differential from an HMI or the data monitor without touching the logic. Keep the differential as its own word so changing it moves cut-in without touching cut-out.
How does defrost interact with this control logic?
If the box has a defrost cycle, the solenoid logic must be interlocked out for the whole defrost period plus the drain-down time, or the loop will pull the box down while the defrost heaters and fans are still running and will fight the defrost termination. Gate the latch rung with a defrost-in-progress bit from your defrost sequence, and re-enable control only after drain-down is complete.
How many compressor starts per hour is too many?
There is no single published limit; the compressor manufacturer's data sheet states the maximum for that machine. Use your trend to count cycles per hour at steady state: on a stable load, more than a handful of starts per hour on a medium-temperature box usually means the differential is too tight. Widen it in half-degree steps and re-trend before touching anything else.


