A touchscreen HMI that freezes mid-cycle, with no timeout warning until you unplug the comms cable, is usually a victim of the DC supply it shares with solenoid coils. The reverse-voltage spike from a de-energizing coil upsets the screen's processor even when the amp budget has room. Give the screen its own supply and fit a flyback diode across every DC coil, band to positive.
A touchscreen HMI that freezes mid-cycle, never posts its timeout warning until you unplug the comms cable, and keeps freezing after a replacement screen goes in is not a bad screen and rarely a bad PLC. The usual cause sits in the DC distribution. The screen shares its supply with solenoid coils, and every coil puts a reverse-voltage spike on that rail each time it switches off. The spike reaches the screen's processor and locks it. The fix is electrical: give the screen its own DC supply, keep the coils on theirs, and fit a flyback diode across every DC coil with the band to the positive side. This page separates the symptoms, runs the checks that tell an electrical freeze from a software one, and works the load arithmetic that shows why spare amps are not the test.
What a switching coil does to a shared rail
A DC solenoid coil is an inductor. Energized, it stores energy in its magnetic field while the supply voltage holds the current flowing forward. The moment a switch or transistor cuts the current, the field collapses and the coil drives its own current out in reverse. With nothing to absorb it, that reversal shows up as a voltage spike many times the supply voltage, and on a shared rail the spike lands on every device connected to the supply, screen included.
Panel makers warn that any transient spike on the supply or ground can freeze an HMI or leave it unresponsive. The processor locks up before the communications watchdog can post its PLC COMMS TIMEOUT banner, which is why the screen dies silently and only shows the timeout after you pull the cable. Installation guidance for panels of this class asks for the screen on a supply isolated from every other device for exactly this reason. The field rule is blunt: never put a semiconductor device on a DC supply that also feeds coils.
Symptoms and what each one points to
- Freeze mid-cycle, timeout banner only after you unplug the comms cable. The screen hung before its watchdog could report. Look at the supply rail and the loads on it, not at the PLC port.
- A replacement screen freezes the same way in the same place. The cause is outside the screen. Stop swapping hardware and test the supply arrangement.
- The freeze lands when a solenoid valve steps. Unsuppressed DC coil CEMF on a shared supply; this is the case worked out below.
- The screen runs cleanly on a separate supply with everything else unchanged. Shared-supply noise is confirmed as the path.
- The freeze follows a fixed time after startup or a video clip, with no link to valve switching. A software or content cause, which the checks below separate.
Power trouble travels in other ways too. A severe enough power event can cost a panel its project file rather than just its screen state; HMI panel loses its project after a power cycle covers that failure.
Checks to run before you swap the PLC
- Trace the screen's supply and list every load on it. Follow the DC feed from the screen's power terminals back to the supply and write down each device on the way. Any coil on the list moves the CEMF path to the top.
- Line the freeze up with the machine cycle. Note what step was in progress at each freeze. Freezes that repeat at the same valve step point at that coil. Freezes with no cycle link point at software or content.
- Feed the screen alone. Connect a separate supply at the voltage the screen's documentation states, leave the comms cable and grounding as they are, and run the exact sequence that preceded the freeze. Change one variable at a time. The case behind this page changed the cable and the supply together, so the good result could not say which change mattered; repeating with only the supply changed settles it.
- Split out a software hang where the signs point that way. On a panel running an embedded Linux system, capture logs across the freeze to see whether a process died. A hang that arrives a fixed time after startup matches a runtime pinned at full processor load; runtime process hits 100 percent CPU a minute after startup shows that pattern. A hang tied to playback has its own diagnosis in HMI video playback freeze.
- Leave the PLC where it is. A controller swap costs downtime and leaves the disturbance on the rail. Run the supply test first; the comms port is rarely the part that failed.
Example: a 6-inch screen on a 4 A supply with 2.3 A of valves
The case: a 6-inch touchscreen HMI and a set of solenoid valves share one DC supply, and the screen freezes whenever the valves step.
Inputs, and where each comes from:
- 4 A, the rating of the DC supply feeding both the screen and the valves (the supply installed in the case).
- 2.3 A, the most the valves draw together (measured peak on the case's machine).
- 1.2 A, the current the case's panel installation guidance requires to be available at power-up for a 6-inch screen; the same guidance lists 1.5 A for a 15-inch panel. Check your own panel's documentation for its figure.
The rule in words: a supply carries every connected load at the same time, so the steady-state budget is the supply rating minus the sum of the loads. The budget tests average current. A de-energizing coil injects a transient, and no amp budget absorbs a transient.
The arithmetic:
2.3 A of valves + 1.2 A of screen at power-up = 3.5 A of simultaneous load
4.0 A supply rating − 3.5 A of load = 0.5 A spare, 12.5% of the 4 A rating
The result: the budget passes with 0.5 A to spare, and the screen still froze every time a valve de-energized. The spike lands on the rail whether or not the amp count leaves room.
The decision, with its threshold: the threshold is a count of shared coils, not spare amps. One DC coil on the screen's supply calls for a separate screen supply and a suppression diode on that coil. Zero shared coils is the configuration that passes for the screen.
The fix: separate supplies and a diode across each DC coil
Move the screen to its own DC supply, at the voltage its documentation states and sized to at least its stated power-up figure, 1.2 A for the 6-inch panel in the example. Inside a cabinet or behind a panel, a rail-mount DC supply is the usual part for this job; ours is in the accessories section. Keep the solenoid valves and any other coils on their own feed and their own switching circuits.
Suppress every DC coil as well, because the diodes protect the switching device even after the supplies are split. Fit a flyback diode across each coil in reverse parallel: the banded end, the cathode, goes to the coil's positive side. Wired that way, the diode blocks while the coil is energized and conducts the instant the coil switches off, closing the loop for the collapsing field and clamping the coil terminal to about one diode drop above the supply, roughly 24.7 V on a 24 V DC coil with a silicon diode.
Take the part from the coil or valve maker's documentation: reverse-voltage rating comfortably above the coil's supply voltage, current rating at least the coil's current. A general-purpose rectifier in the 1N4XXX series or similar is the common choice for small valve coils, and the coil data picks the exact part. Suppression also saves the switch gear: without it the spike arcs across relay contacts and shortens their life, and a transistor output takes the same stress.
Confirm the coil is DC before fitting a diode. A DC flyback diode across an AC coil conducts on half of every cycle and burns out; AC coils take suppressors designed for alternating current, specified by the coil maker. A diode also slows the coil's release slightly, so where a valve's drop-out time matters, use the suppressor the valve documentation names.
Recommendation: put the screen on its own DC supply whenever even one DC coil shares its feed, whatever the amp budget shows, and fit a flyback diode across every DC coil, band to the positive side. Take the diode part from the coil or valve documentation, and treat the diodes as protection for the contacts and outputs once the supplies are separate.
Proving the fix and keeping it
Run the exact sequence that preceded the freeze three times in a row with every valve stepping, and watch the screen through each cycle. No freeze in three clean passes on the worst-case sequence is the acceptance test; then run a normal shift. Log what changed: screen on its own supply, valve and coil list, diode fitted across each coil with the band to positive.
Check the suppression at each service interval. A diode that fails open or a terminal that works loose puts the spike back on the rail with no other symptom, and nothing on the screen announces it. Inspect the diode bodies and terminations whenever the panel is opened, and keep the labels current so the next person in the cabinet knows the screen's feed is separate on purpose.
Questions
Why does the screen freeze instead of showing its PLC COMMS TIMEOUT banner?
The reverse-voltage spike reaches the screen's processor directly and locks it up before the communications watchdog can run, so the screen dies silently. The timeout only appears afterward, when you unplug the comms cable and the screen briefly recovers enough to notice the missing PLC reply. That sequence points suspicion at the PLC port when the real disturbance entered through the power terminals.
How close to the coil does the flyback diode have to be?
Fit it directly across the coil's own terminals, or as close as the wiring allows. The diode works by giving the collapsing field a short local loop, so long leads back at the panel put inductance back in that loop. A diode mounted at the supply instead of at the coil leaves the whole coil lead length in the circuit. A suppression diode built into the valve's connector, or a small terminal block beside the valve, both work.
What does an AC solenoid coil need instead of a flyback diode?
An AC coil needs a suppressor built for alternating current, such as an RC snubber network or a metal-oxide varistor rated for the coil voltage; the coil or valve maker lists the part. Read the coil label first: many valves are sold in both AC and DC versions that look identical from outside, and the suppression that protects one can destroy the other.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.