AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Troubleshooting

Wiring a solenoid valve to a PLC digital output

Pneumatics and hydraulics Published 8 min read By AutomateDirectUSA engineering team

Short answer

The solenoid wires between a numbered output terminal such as O1 and the supply return, with the supply positive on COM for relay outputs or on the group power terminal for sourcing outputs. Size the point with I = P/24 V against both the per-point and per-common ratings, fit a flyback diode cathode to positive, and give a 20 mA servo valve a true current channel or an amplifier.

On this page
  1. Should the solenoid valve wire to COM or O1?
  2. Can the PLC digital output carry the solenoid coil?
  3. What happens at COM and the output when the bit is 1?
  4. Why does the solenoid coil need a flyback diode?
  5. Why will the analog output not drive the servo valve?
  6. Does the servo valve need an amplifier instead?
  7. What do you check first when a solenoid valve will not stroke?
  8. Questions asked

Wire the coil between a numbered output terminal — O1, O2 or O3 — and the supply return; never hang it on COM. COM is the group's supply node: on relay outputs you feed the supply positive into it, on sourcing outputs the positive feeds the group's power terminal instead. Two numbers then decide whether the valve strokes at all: the coil's holding current, P divided by the supply voltage, checked against the per-point and per-common ratings, with a flyback diode across the coil; and, for the servo valve's 20 mA command, the analog channel's compliance voltage. Below is the circuit, the arithmetic and the order of checks.

Should the solenoid valve wire to COM or O1? #

Wire the coil to a numbered output terminal such as O1, O2 or O3 and return the second coil lead to the supply return; COM is the group's supply node, not a spare output, so a coil hung on it alone never energizes.

Embedded digital outputs come in two electrical types, and the controller's catalog number tells you which one you have.

  • Relay outputs are dry contacts. One side of every contact in a group ties to that group's COM. Feed the supply positive into COM; when the rung turns true, the contact hands that positive to the output terminal, and the coil's second lead completes the path back to the supply return.
  • Sourcing transistor outputs switch the positive rail. The supply positive feeds the group's power terminal, an energized output puts that positive on its own terminal, and the coil runs from the terminal to the return.

Either way the coil sits between an output terminal and the opposite rail. Landing both coil leads inside one group — one on COM, one on O1, on a relay group — puts the coil across a closed contact: no voltage across it when the contact closes, no path when it opens. The same supply-and-return reasoning decides whether one of these outputs can power a 3-wire proximity switch from a digital output.

Can the PLC digital output carry the solenoid coil? #

Size the point with the coil's holding current, I = P / 24 V: a 6 W pilot coil draws 250 mA, an easy load for one output point, while eight of them load one common with 2 A, which is where a group rating runs out.

Take both limits from the controller's specification table: the per-point figure for one coil, the per-common figure for the whole group.

Worked example, calculated for these inputs and not a measurement. The coil nameplate says 6 W. I = P ÷ 24 V = 6 W ÷ 24 V = 0.25 A, so 250 mA per coil. Resistance follows as R = V² ÷ P = (24 V)² ÷ 6 W = 96 Ω, the reading a meter should show cold. Per common: 8 coils × 0.25 A = 2 A. If the table rates the common below that, split the valves across two groups or drive one interposing relay per valve and let relay contacts carry the coils.

Holding current is the steady number, not the whole story. While the armature moves, the magnetic circuit still has an air gap and a DC coil draws more than its holding figure — solenoids do have a pull-in surge, and the switching device sees it on every cycle. Where the datasheet quotes separate pull-in and holding currents, check both against the point rating; where it does not, measure the surge once with a current probe before trusting the margin.

What happens at COM and the output when the bit is 1? #

A 1 in the output image closes the switch inside the controller: on a relay group it connects COM through to that output terminal, on a sourcing group it places the supply positive on the terminal, and either way the coil sees the full supply across itself.

A 0 opens that path and the coil current falls to zero. The bit creates nothing — no voltage, no current — it only arranges a path between the supply rails you landed on the terminals. That is why moving the coil lead from O1 to O2 changes nothing when the return is missing: every terminal in the group hands out the same supply.

One controller state outranks the bit: outside Run the outputs are held de-energized, and a download holds them off while it completes. Forcing a 1 in Program mode proves nothing about the field wiring, because the terminal stays dead regardless of the force.

Why does the solenoid coil need a flyback diode? #

Fit a diode directly across the coil terminals, cathode to the positive side, because interrupting an inductor forces V = -L(di/dt) across the switch, and an unsuppressed DC coil punches through a transistor output stage or sustains an arc across relay contacts.

The coil stores energy in its magnetic field; when the output opens, that current needs a path, and the only one left runs through the switching device. The diode provides a legal one — reverse-biased and invisible while the coil is energized, conducting the moment the switch opens, circulating the current until it decays. Mount it at the coil terminals so the loop stays short, pick a rectifier diode rated above the coil current and above the supply voltage, and verify the cathode stripe faces the wire that will be positive.

Relay contacts want the same treatment: the collapse spike sustains an arc that eats contacts operation after operation, and a welded contact holds the valve on. When the coil current sits close to the point rating, drive an interposing relay from the output instead, switch the coil with its contacts, and give each coil — the relay's and the solenoid's — its own diode.

Why will the analog output not drive the servo valve? #

Because a 4-20 mA command is a current loop: the channel must be a true current type, the loop must close back on the channel's own return terminal, and the total loop resistance must sit inside the channel's compliance limit.

A current channel is a regulator: it raises its terminal voltage until the commanded current flows, and it can raise it only so far. The loop demands V = I × (R_load + R_wiring). Worked example, calculated: 20 mA into a 250 Ω command input plus 10 Ω of cable needs 0.020 A × 260 Ω = 5.2 V, so the channel must deliver at least that and stay within its rated maximum load. Past that maximum the channel saturates and the loop current sits below setpoint no matter what you write; take the maximum load figure from the module specification, never from assumption.

Many embedded analog outputs are voltage-only. A 0-10 V channel with a series resistor is not a current source — the current shifts with coil temperature and lead length, so the command drifts with the cabinet's warmth. Setting the channel's output type to current, in the analog module's channel configuration, is part of the circuit, not of the program.

What will not move the valve, all tried first and all useless:

  • Moving the servo valve's lead onto a digital terminal or COM. A digital terminal hands out the raw supply, not a regulated current command.
  • Writing 20 into the analog variable. The word holds raw counts, and 20 counts is a fraction of a percent of full scale — indistinguishable from live zero.
  • Fitting a larger supply. The per-point ceiling is the switching device and the analog ceiling is the compliance voltage; both live inside the controller.

Does the servo valve need an amplifier instead? #

Yes, when its datasheet gives a coil resistance in ohms and a bipolar rated coil current: that is a torque motor, and a unipolar 4-20 mA channel cannot reverse polarity to drive the spool both ways, so a servo amplifier card goes between the PLC and the coil.

The amplifier regulates bipolar coil current and carries the null and gain adjustments; the PLC then commands the amplifier, most often with a ±10 V signal, and the wiring and tuning for that command are their own job, covered in PID control of a ±10 V proportional valve from a PLC. Only a valve that specifies a 4-20 mA or 0-10 V command into a high-impedance input connects straight to the channel. When the command is 0-10 V, every device's analog common ties back to one node, the practice wiring 0-10 V sensor and drive outputs to one analog common works through.

Before any of that, the valve's symbol and datasheet say which of the two you hold, so what a pneumatic valve symbol specifies before you select one is where to start.

What do you check first when a solenoid valve will not stroke? #

Work from cheap to expensive: controller in Run, supply present at COM, coil resistance on the meter, then current — in that order, because each step either fixes the fault or licenses the next.

Isolate the supply and follow the machine's lockout procedure before you land or move a lead; a valve that strokes unexpectedly moves whatever it controls.

  1. Confirm the controller is in Run and the rung is writing a 1 — watch the status LED at the terminal. No LED means the fault is upstream of the wiring.
  2. Command the output on and measure across the coil. Full supply voltage with no click points to an open coil: power down and measure its resistance; an open reading is the valve, not the controller.
  3. Zero volts across the coil with the bit on means a broken path: check the supply positive at COM or the power terminal, the fuse feeding it, and terminal seating.
  4. Current far above the calculated figure means a shorted coil or the wrong valve. A point that conducted once and never again points at a missing diode that killed the transistor.
  5. For the current loop, put a milliammeter in series, command full scale and read. A reading stuck below setpoint at full command is a compliance shortfall — total the loop resistance against the channel's rated maximum load.

Questions asked

Can several solenoid valves share one COM terminal?

Yes, as long as the summed coil currents stay under the common's rating with margin. Eight coils at 250 mA put 2 A through one common, so if the specification table rates it lower, split the valves across two groups or drive one interposing relay per valve and switch each coil on a relay contact. Keep every flyback diode at its own coil, and size the wire feeding the common for the total current, not for one valve.

Does a flyback diode make the valve close slower?

Slightly, yes. The diode lets coil current keep circulating after the output opens, so the magnetic field decays gently and release takes a little longer. When a valve must drop out fast, use a diode with a Zener or an MOV in series, which lets the coil voltage climb higher so the field collapses sooner and the valve releases faster. Verify drop-out timing on the bench before tuning anything that depends on it.

Is COM the same thing as 0 V?

No. COM becomes whichever rail you land on it: with the supply positive fed in, it sits at positive potential and each output terminal hands that positive to its coil. The name implies no ground connection, so on a used machine with unknown wiring history, measure COM against the supply return with a meter before trusting any terminal.

Can the analog output switch the solenoid valve instead?

No. A current channel regulates a signal of at most 20 mA into a high-impedance command input, far below a solenoid's pull-in current, and a voltage channel cannot source coil current at all. Switching loads belong on digital outputs sized for the coil, or behind an interposing relay when the coil outgrows the point rating.

Keep reading

  • How-to

    Building a Pneumatic Cycle Test Stand Without a PLC

    Stop the test with a preset counter set to 10, not a 60-second timer: a 3 s extend plus 3 s rest gives 6 s per commanded cycle, which is a duration check, not proof of ten strokes. Wire a Start/Stop-sealed control relay to feed a 3 s on / 3 s off repeat-cycle timer driving a single-solenoid spring-return 3-way valve, and let the counter's preset contact break the run circuit.

    Pneumatics and hydraulics

  • How-to

    Path control of a hydraulic cylinder with 4-20 mA feedback

    Yes, a 4-20 mA transducer closes a hydraulic cylinder position loop as a slow process value, never as an encoder substitute. Scale the 16 mA span to the calibrated stroke, run acquisition, trajectory, control and valve output in one fixed-period task, treat out-of-range current as a motion-stopping fault, and keep the measured input-to-output delay below the following-error budget your velocity allows. Worked example: 250 mm stroke, 200 mm/s, 25 ms budget.

    Pneumatics and hydraulics

  • Explainer

    Alternator frequency control of a hydraulic proportional valve

    A hydraulic-motor-driven alternator is a speed sensor: output frequency in hertz equals rpm times pole count divided by 120. Convert that frequency to a DC command with a 555 timer or a CD4046 phase-locked loop against a quartz reference, filter it, amplify the error, and drive the proportional valve with current. The loop holds flow constant while a PTO pump's speed follows the road.

    Pneumatics and hydraulics