When an HMI panel talks to the PLC only while the programming cable is attached, the link is borrowing its ground reference from the laptop. RS-232 needs a signal common shared between the panel and the PLC. Land a separate ground wire from each device on the same panel ground point, then read millivolts or less between the two signal commons with the computer removed.
A panel link that runs only while the programming laptop stays attached is not a settings problem. The laptop is lending the link its ground. RS-232 is a ground-referenced signal: each receiver reads its data wire against a signal common, and a panel and a PLC with no shared common have no defined signal levels at all. The fix is wiring: a separate ground wire from the panel and a separate ground wire from the PLC, both landed on the same panel ground point. With the computer removed, the voltage between the two signal commons should read millivolts; volts mean the laptop was the only bond. Work through the checks cheapest first. Run the password check only when the failure follows closing the programming session; otherwise go straight to the ground.
Why the laptop changes the link
TIA/EIA-232, the standard behind RS-232, defines every data state as a voltage measured against the signal common, pin 5 on a 9-pin port and pin 7 on a 25-pin port. A driver delivers between 5 and 15 V of the correct polarity, and a receiver reads a valid state only outside the band from -3 V to +3 V. At the 5 V driver minimum that leaves 2 V of headroom, so a few volts of offset between two devices' commons consumes the entire margin.
While the laptop is attached, the programming cable and the laptop's own supply give the two commons a path to a grounded point, and the levels line up. Pull the cable and the reference floats. This also explains why the protocol settings were never the problem: the link ran with the laptop in place, so panel and PLC were already talking the same protocol. Changing protocols spends the shift on wiring.
Panel manuals carry a standing warning that a voltage potential between two separate ground points can damage a communications port, which is why this wiring check comes before any settings change.
Symptoms and what each points to
- The link dies the moment the programming session closes in software, cable still seated. The PLC lifts its password during a session and locks again afterwards. Check 1.
- The link dies only when the cable is physically pulled. Missing ground bond between panel and PLC. Check 3.
- The link never worked, and the cable was built in-house. Signal-common conductor missing or open. Check 2.
- Intermittent timeouts with a switching supply and fan sharing a tight enclosure. Noise on the run; test it after the ground reads millivolts. Check 4.
- The panel goes dark or reboots when the cable comes out. A second borrowed dependency: power arriving through the programming cable. Check what the programming cable feeds the panel before touching anything on the link.
Check 1: the PLC password state
If a password is set on the PLC, the programming session can lift it, and the PLC locks again when the session closes. The panel then times out at exactly the moment the laptop leaves, which matches the first symptom above. Your PLC manual documents a password level intended for a panel that stays connected permanently; the manual prints the exact format, so take it from there. No password set, or adding one changed nothing? Move to the wiring and leave the PLC without one: a password added to a machine that ran without cannot cure a wiring fault, and it leaves a lock to manage.
Check 2: the cable and its port
Confirm the panel cable sits in the port the project addresses. A small PLC has a programming port and a panel port, and they are not interchangeable. A factory cable of the usual 3 m length was built and tested with all conductors in place, so a conductor fault is rare; swapping in a known-good one is a five-minute test if a spare is at hand. A cable built in-house gets a continuity check on every conductor, end to end, against the conductor list in each device manual, signal common first, because that is the conductor home builds most often leave out. Keep any replacement run inside the length its interface is specified for; the numbers by interface are set out in HMI to PLC serial cable maximum distance.
Check 3: land the ground bond
This is the fix in most cases. Power down and lock out the enclosure first, and use a meter rated for the measurement category of the panel whenever terminals are live.
- Find the ground terminal on the PLC and the ground terminal on the panel. Each device manual marks it and gives the conductor size.
- Run one wire from the PLC ground terminal to the panel's ground bus or stud. Run a second wire from the panel's ground terminal to that same point. Two wires, one point. A single wire daisy-chained through the first device shares current and defeats the purpose.
- Continuity-check each device's ground terminal to that point. A wire that was never landed reads open, and an open wire in a dense bundle looks installed from across the cabinet.
- Tighten every lug and power up.
With the panel powered and the computer removed, put the meter in DC volts between the panel's signal common and the PLC's signal common. Millivolts mean the bond is made. Volts mean it is missing. The arithmetic behind those readings is in the example below.
Example: what the common-to-common voltage tells you
Scenario: a 6-inch touch panel loads upper and lower limits on a small PLC over a 3 m factory cable. With the laptop removed, the panel throws PLC Communication Timeout on every screen change. A DC voltmeter between the two signal commons reads 4.5 V.
A driver at the 5 V minimum sends a mark at -5 V. The panel's receiver measures that line against its own common, which sits 4.5 V above the PLC's, so the mark arrives reading -5 + 4.5 = -0.5 V. The receiver reads nothing reliably between -3 V and +3 V, so every mark lands in the dead band and the link times out. The offset budget at that driver level is 5 - 3 = 2 V. This panel sits 4.5 V off, more than twice the budget.
After both grounds are landed on one point, the same measurement reads 0.02 V. The mark arrives at -5 + 0.02 = -4.98 V, comfortably outside the dead band, and the link holds.
The reason a sound bond reads millivolts: a receiver input presents 3 to 7 kΩ, so one data line carries about 15 V ÷ 3 kΩ = 5 mA, two data lines move roughly 10 mA through the common, and 10 mA across a 0.1 Ω bond drops 10 mA × 0.1 Ω = 1 mV. Even 0.3 V at that current means about 30 mΩ of bond path, still solid metal. The decision: millivolts to a few tenths of a volt means the bond is made; a reading near the 2 V budget or above means find the missing wire.
Check 4: noise, once the ground reads millivolts
If timeouts persist with a verified bond, treat the run as a noise problem. Route the panel cable away from the switching supply, its wiring and the fan leads. Cross power wiring at right angles. Do not coil the excess length beside the supply, and shorten the run only when the new cable is built to the conductor list in each manual; extending an RS-232 HMI cable carries its own rules, and the same conductor discipline applies to shortening. Land the supply's own ground terminal on the same panel point as the two device grounds.
The fix, and the sign it held
- Disconnect the programming cable physically.
- Power-cycle the panel and the PLC.
- Write a setpoint from the panel, let several poll cycles pass, and watch for PLC Communication Timeout.
- Re-measure between the two signal commons. Millivolts.
- Note both ground wires and their landing point on the panel drawing, so the next technician sees the topology before troubleshooting.
Recommendation: treat a link that runs only with the programming cable attached as a wiring fault. Check the PLC password state first when the failure tracks the software session; otherwise power down, land a separate ground wire from the panel and from the PLC on the same panel ground point, and accept the repair only after the common-to-common reading is millivolts with the computer removed. A link that worked with the laptop attached already had compatible protocol settings, so no settings change belongs in this job.
Questions
Can the programming laptop just stay connected as the fix?
It gets the line running today, and it is a temporary measure only. The laptop's ground path disappears when the battery runs down, the machine sleeps or the lead is pulled, and a tethered laptop is not a wiring method. Land the two ground wires; the repair should hold with nothing plugged into the PLC's programming port.
Does the same ground rule apply to RS-422 or RS-485 panels?
Yes, with a wider tolerance. Those interfaces measure the difference between two data wires, so a small common offset rides along harmlessly; transceivers are specified for a common-mode range of -7 to +12 V. An offset beyond that range corrupts the link just the same, so the bond still matters. Read the range printed for your panel's port.
What size should the two ground wires be?
Take the conductor size from each device manual, which states it for its ground terminal. The decision this article adds is the topology rather than the gauge: two separate wires, one shared panel ground point, and a continuity check from each terminal to that point before the panel goes back into service.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.