IMDTouchKnowledge BaseShop main store

Troubleshooting

Building the RS-232 Modbus cable between an HMI and a controller

Industrial networks Published 7 min read

Short answer

Map the pins by signal name, not by number: the HMI's transmit on 25-pin pin 2 goes to the controller's receive, the HMI's receive on pin 3 comes from the controller's transmit, and signal common runs end to end. The jumper between pins 8 and 12 stays at the HMI connector. Generic straight-through and null-modem cables cause silence because the 25-pin and 9-pin standards number the data lines differently.

On this page
  1. Wire by signal name, not by pin number
  2. The 25-pin HMI end
  3. The 9-pin controller end
  4. Wiring the 25-pin HMI port to the 9-pin COM3 port
  5. Serial settings that must match
  6. When the link stays silent
  7. Questions asked

A silent Modbus link between a Magelis XBT-E015010 HMI and a SCADAPack 32 controller is a cable problem until proven otherwise, and the cable is built by signal name, not by pin number. The HMI's 25-pin port transmits on pin 2 and receives on pin 3; those must land on the controller's receive and transmit respectively, with signal common carried end to end and the jumper between pins 8 and 12 kept at the HMI connector. A generic straight-through or null-modem cable is the usual culprit, because the 25-pin and 9-pin worlds number the same signals differently. Build the three-conductor cable mapped below, prove it with a meter reading, then match the serial settings, in that order.

Wire by signal name, not by pin number #

RS-232 standardizes the signals and their voltage levels; it does not define the null-modem connection at all, which is why several crossover layouts coexist and why a cable labeled null modem guarantees nothing across connector families. The rule that holds everywhere: one device's transmit connects to the other's receive, receive back to transmit, and signal common joins the two. Handshake lines such as RTS and CTS cross the cable only when both devices are documented to use them; on this HMI the local 8-to-12 jumper covers that need at the HMI end.

Connector gender and pin count tell you nothing about a port's role either: whether a device is DTE or DCE is decided purely by how its port is wired internally. Some equipment inverts the usual expectation entirely, which is why round 20-pin serial ports that take a straight-through cable instead of a null modem exist at all. The pin map in the documentation, not the label on a cable, is the authority. The same discipline applies when a replacement HMI must inherit an existing link, as in the DH-485 RS-232 pin map for an HMI replacement.

The 25-pin HMI end #

The HMI's RS-232 connection sheet for this family gives four facts:

  • Pin 2, transmit data (TD): the HMI's output.
  • Pin 3, receive data (RD): the HMI's input.
  • Pins 8 and 12, jumpered together at the connector: a local requirement of this HMI, kept on the HMI side.
  • Signal common on pin 7, the classic 25-pin assignment this port follows; the connector drawing in the manufacturer's online manual confirms it in seconds.

Two data conductors and the common leave the connector; the jumper does not. Its electrical purpose is defined by the HMI documentation, and what matters for the cable is only that it stays on the HMI side unless the documented cable drawing says otherwise.

The 9-pin controller end #

COM3 on the controller is a 9-pin connector, and 9-pin serial ports follow the TIA-574 signal mapping. On a port wired as DTE, the normal case for a controller port of this kind, the assignments are:

Pin Signal Direction at a DTE port
1 DCD input
2 RD input
3 TD output
4 DTR output
5 signal common reference
6 DSR input
7 RTS output
8 CTS input
9 RI input

The cable needs three rows of that table: pin 3 transmit, pin 2 receive, pin 5 common. Whether COM3 actually transmits on pin 3 is fixed by the controller's wiring, not by the connector, and the meter test below settles it in one reading before you crimp anything.

Wiring the 25-pin HMI port to the 9-pin COM3 port #

Inputs #

  • HMI port: 25-pin, transmit on pin 2, receive on pin 3, jumper between pins 8 and 12, from the HMI's RS-232 connection sheet.
  • HMI signal common: pin 7, the classic 25-pin assignment.
  • Controller port: 9-pin COM3, taken as DTE per TIA-574, so transmit on pin 3, receive on pin 2, common on pin 5.
  • Transmitter idle level: an RS-232 driver rests at mark, between -3 V and -15 V relative to signal common, per the TIA-232 electrical definition.

Rule #

Transmit lands on receive in both directions, common lands on common, and the 8-to-12 jumper stays at the HMI connector.

The mapping written out #

  • HMI transmit is pin 2. The controller's receive, on a DTE-wired 9-pin port, is pin 2. Conductor 1 runs pin 2 to pin 2.
  • The controller's transmit is pin 3, and the HMI's receive is pin 3. Conductor 2 runs pin 3 to pin 3.
  • Common joins common: conductor 3 runs HMI pin 7 to controller pin 5.
  • Jumper pin 8 to pin 12, at the HMI connector only.

The finished cable is three conductors and one local jumper:

Conductor HMI, 25-pin Controller, 9-pin Carries
1 2 2 HMI transmit to controller receive
2 3 3 controller transmit to HMI receive
3 7 5 signal common
jumper 8 to 12 none local, HMI end only

Note what happened: the correct cable is straight-through by pin number, 2-to-2 and 3-to-3, purely because the 25-pin and 9-pin standards number the same signals differently. A commercial DB25-to-DB9 null modem crosses 2 and 3 and lands transmit on transmit. That cable, or a modem cable wired straight by signal for a DCE device, is where the silence usually starts.

Verify with a meter #

Power both devices and leave the cable off the controller end. Meter on DC volts, black lead on COM3 pin 5. The pin resting between -3 V and -15 V is the controller's live transmitter, and on a DTE-wired port that reading appears on pin 3. Use the DC volts range only; never ohms or continuity on a powered port. The same test at the HMI, black lead on pin 7, shows transmit idling negative on pin 2 and independently confirms the connection sheet.

Result and decision #

If the negative idle sits on COM3 pin 3, crimp the 9-pin end exactly as mapped: the electrical path is proven and both transmitters are accounted for. If it sits on pin 2 instead, the port is wired the other way, so swap conductors 1 and 2 at the 9-pin end and retest once. That single swap is the entire search space for wiring. If the controller then shows received traffic but still never answers, the cable is exonerated and the fault is in framing, roles, or addressing, covered next.

Serial settings that must match #

Modbus defines the message, not the wire, so agreeing on the protocol buys nothing until the character format agrees too: the slave device's baud rate, parity, and stop bits must match the master's exactly, and a mismatch produces the same total silence as a broken conductor. Set these five things at both ends:

  • Framing mode: both endpoints RTU, or both ASCII.
  • Baud rate, data bits, parity, stop bits: identical values.
  • Role: the HMI is the master issuing requests, the controller is the slave answering. Two slaves stay silent forever; two masters talk over each other.
  • Slave address: the controller's Modbus address equals the address the HMI polls.
  • Port binding: the controller's Modbus service runs on COM3, the port you wired.

The decision rule: whatever the controller is already running wins. Read its active settings and address, then set the HMI to match, never the other way round. One physical limit while the hood is up: an RS-232 driver is specified into about 2500 pF of load capacitance, which ordinary cable reaches near 15 m (50 ft). Keep this link point-to-point and short; when the run grows or a second HMI appears, connecting multiple HMIs to one PLC over 200 ft of serial with RS-485 is the design that replaces this cable.

Work the failure in the order the bytes travel:

  • No transmit from the HMI at all: the loaded application, selected driver, port assignment, or polling list. The HMI is not even trying.
  • The HMI transmits but COM3 shows no received traffic: back to the cable, meaning the data pair, the common, and the swap test above.
  • The controller receives but sends no reply: its Modbus service configuration, slave address, and framing diagnostics.
  • The controller replies but the HMI still times out: the return conductor, pin 3 to pin 3, and the HMI's receive settings.
  • A Modbus exception comes back instead of data: the request was decoded fine, so check the function, register area, address, and quantity. HMI drivers display register references in their own notation, which rarely matches the address encoded in the request; compare the driver's convention with the controller's register map before touching any offset.

Once traffic flows both ways and values still refuse to move, you have left cable-land: why HMI indicators stay off over Modbus RTU polling is a tag-side failure with its own diagnosis.

Questions asked

Does the 8-to-12 jumper belong in the cable or at the HMI connector?

It stays at the HMI's own 25-pin connector: a jumper wired across pins 8 and 12 on that end, never conductors carried to the controller. It covers a local requirement of this HMI family, which is why the cable itself carries only the two data conductors and signal common. Do not extend it across the link or copy it at the controller end unless the HMI documentation's cable drawing calls for it.

Can a multimeter find the transmit pin without a manual?

Yes. Power the device, set the meter to DC volts, and put the black lead on signal common. An RS-232 transmitter idles at mark, between -3 V and -15 V, so the pin holding a steady negative voltage relative to common is that device's transmit. The opposite data pin sits near 0 V until traffic arrives. One reading settles whether the port is wired DTE or DCE.

How far can an RS-232 Modbus cable like this run?

The driver is specified into roughly 2500 pF of load capacitance, which ordinary cable reaches around 15 m, about 50 ft. At low baud rates longer runs sometimes work, but errors arrive without warning. Past that budget, or the moment a second HMI needs the same controller, move the link to RS-485, which multidrops and covers far longer runs.

Both ends are set to Modbus RTU, so why is there still no reply?

RTU agreement covers framing only. Baud rate, data bits, parity and stop bits must match at both ends; one device must be the master issuing requests while the other answers as slave; the slave's address must equal the address the master polls; and the controller's Modbus service must be bound to the physical port in use, here COM3. One mismatch anywhere in that list produces total silence with a perfect cable.

Keep reading

  • How-to

    How to Upload an HMI Program Without the Right Cable Pinout

    Upload an HG3F with the documented programming cable HG9Z-XCM1A, which runs from a 9-pin RS-232 port on the PC to Serial Interface 2 on the panel. Do not fabricate a pinout, and confirm the installed WindOI-NV2 version permits upload before you connect.

    HMI and touchscreens

  • Selection guide

    How to Select Lightweight HMI Software for Modbus I/O Control

    Select on three gates in order: a driver that speaks Modbus RTU (and Modbus TCP if the LAN path is required), a tag license at least 20 percent above your counted total, and a runtime that runs the exported project on a clean PC. A 56-device floor plan counts 154 tags, so a 150-tag edition already fails. Prove one floor plan, one popup, one live indicator and one write before you pay.

    HMI and touchscreens

  • Selection guide

    Selecting a Modbus TCP HMI Panel for an Existing Controller

    A replacement HMI qualifies when its Modbus TCP client driver reproduces the working panel's tag map exactly: data area, raw address, word order and write behavior. A connection that polls proves reachability, not correctness — prove one known tag and one supervised write before rebuilding the screens.

    HMI and touchscreens