IMDTouchKnowledge BaseShop main store

Troubleshooting

HMI Modbus TCP works locally but not remotely over cellular

Industrial networks Published 8 min read

Short answer

A Modbus TCP slave reply to an off-subnet client needs a next hop, and the HMI gets that from its Ethernet gateway address. Local polls stay on the HMI's subnet and work with the field blank, which is exactly why the fault looks like a software problem. Enter the cellular modem's LAN address as the gateway, forward port 502 to the HMI, then prove each layer with a local poll, a poll through the modem, and the SCADA client.

On this page
  1. Why does my HMI answer Modbus TCP locally but time out over cellular?
  2. What gateway address does an HMI need for cellular Modbus TCP?
  3. Which port do I forward on a cellular modem for Modbus TCP?
  4. How do I test an HMI's Modbus TCP slave layer by layer?
  5. Is the Crimson gateway block the same as the Ethernet gateway address?
  6. Why does my web browser reach the HMI over cellular but Modbus still fails?
  7. When is a missing gateway address not the cause?
  8. Questions asked

The remote polls time out because the HMI has no Ethernet gateway address configured, so its replies to your cellular client have no next hop off the local subnet. Local Modbus TCP exchanges stay inside the subnet and never touch that setting, which is why the panel looks healthy to every device in the cabinet while every off-site poll fails. The fix costs nothing: enter the cellular modem's LAN address in the HMI's network gateway field, forward Modbus TCP port 502 through the modem to the panel, and verify in order — a local poll of the slave map, the same poll through the modem, then the SCADA client. The worked example uses Crimson, Red Lion's configuration software; the routing rule itself is the same for any HMI that answers Modbus TCP as a slave.

Why does my HMI answer Modbus TCP locally but time out over cellular? #

Because a reply to a cellular client is headed off the HMI's subnet, and an HMI with no Ethernet gateway address configured has no next hop to send it to, while local clients share the subnet and receive replies directly.

When your Ignition server opens a TCP connection through the modem's forwarding rule, the request leg works: the modem delivers the Modbus frame to the panel's LAN address. The reply leg is different. The panel compares the client's source address with its own IP address and subnet mask, sees an off-subnet host, and looks for a configured gateway to hand the reply to. With that field blank, the lookup fails, the reply never leaves the panel, and the client's retransmissions repeat the cycle until the device times out.

Nothing on the client side shows this. The SCADA device configuration, the forwarded port and the cellular signal can all be correct while the reply sits unsent, which is why the fault survives every test you run from the office. Requests arriving while replies never leave is the same failure shape as the documented case of why an SLC 5/03 receives remote polls but not reply, and the first place to look is the same: the responder's own route back.

What gateway address does an HMI need for cellular Modbus TCP? #

Enter the LAN IP address of the router that carries traffic away from the HMI's subnet — for a cellular site that is the modem's LAN-side address, such as 192.168.1.1 for an HMI at 192.168.1.50 with mask 255.255.255.0.

That address must sit on the HMI's own subnet, and the modem's LAN interface is that router whenever the panel is plugged into the modem's LAN port. In Crimson the field lives in the network device settings next to the IP address and subnet mask; other panels call it the same thing in their own network pages. Fill it in whenever any Modbus TCP client the panel must answer sits outside the panel's subnet, and leave it blank only when every client is local.

Worked example: panel at 192.168.1.50 with mask 255.255.255.0, modem LAN address 192.168.1.1, and a cellular client presenting an address in the carrier-grade NAT range 100.64.0.0/10 that mobile networks hand out, say 100.66.12.34. ANDing each address with the mask decides where the reply goes:

  • 192.168.1.50 AND 255.255.255.0 = 192.168.1.0
  • 192.168.1.1 AND 255.255.255.0 = 192.168.1.0 — same subnet, so it is a valid next hop
  • 100.66.12.34 AND 255.255.255.0 = 100.66.12.0 — a different subnet, so the reply is handed to 192.168.1.1

Enter 192.168.1.1 in the gateway field and the remote reply has a path; leave it blank and the reply dies at the panel. The only panel that may run with a blank gateway is one that never answers an off-subnet client, and a cellular-polled panel is not that panel.

Which port do I forward on a cellular modem for Modbus TCP? #

Modbus TCP listens on registered port 502, so the forwarding rule maps the modem's WAN-side port 502 to the HMI's LAN IP address at port 502, and the remote client connects to the modem's public address on that same port.

In the modem's port-forwarding page, create one rule: external port 502, internal port 502, protocol TCP, internal address equal to the panel's LAN IP. If the carrier filters inbound 502, map a high external port such as 5020 to internal 502 and point the client at the public address on 5020; the panel never sees the difference. Give the panel a LAN address that does not change, because the rule aims at the address, not at the panel.

One security note: Modbus TCP carries no authentication, so a forwarded 502 is reachable by anyone who finds the modem's address — restrict the rule to known source addresses if the modem supports it, or keep the site reachable only through a VPN.

How do I test an HMI's Modbus TCP slave layer by layer? #

Test upward in three moves — poll the HMI's slave map from a laptop on the local subnet, poll the same map through the cellular modem, connect the production client only after both pass — then watch several poll cycles before calling it fixed.

Work the layers in this order:

  1. From a laptop on the panel's subnet, poll the panel's LAN IP on port 502 with a desktop test client such as Modbus Poll or Modscan, using the unit ID the slave driver answers. Read a register the gateway block fills, force the underlying value to change, and watch the register follow — this proves the slave role, the port and the map in one pass.
  2. Point the same test client at the modem's public address and forwarded port. If TCP will not connect, the fault is in the forwarding rule, the panel's IP settings or the gateway field; fix this layer before opening any SCADA software.
  3. Connect Ignition last. Copy the destination address, port, unit ID, register addresses, data width and word order exactly from the test client that just passed — a production client that disagrees with a passing test client has a configuration error, not a network problem.
  4. Watch several poll cycles instead of accepting one good read: resets, timeouts or stale values that appear only under repeated polling point at the cellular path, not the map.

A failure at step 1 is a mapping or driver problem, at step 2 a routing or forwarding problem, and at step 3 a client configuration problem. The same staging is what makes connecting Vijeo Design'Air locally and remotely work on other panels, because a remote-only test cannot tell you which layer dropped the transaction.

Is the Crimson gateway block the same as the Ethernet gateway address? #

No — a Crimson gateway block moves data between the HMI's protocols and tags, while the Ethernet gateway address routes packets off the subnet, and a remote Modbus TCP poll needs both configured before a reply can carry data.

The slave driver is the piece that answers: it opens the panel's register space to a Modbus TCP client, and the vendor's documented gateway driver can present several drop numbers, so one panel can appear to a client as multiple slaves. A gateway block then fills that space, copying values from the tags or device protocols the panel already runs into the slave's registers. The Ethernet gateway address does none of this; it is only the routing destination for packets leaving the subnet.

So the two failures read differently. If step 1 of the layered test returns live values, the slave driver and the gateway block are proven and a remote-only failure is routing — go back to the gateway field. If no client anywhere reads a value, the block, the register types, the word order or the unit ID is wrong. Hunting the driver's options for a checkbox that allows remote access is the trap here: the missing piece was a routing field, not a driver option.

Why does my web browser reach the HMI over cellular but Modbus still fails? #

Because the web server and the Modbus slave are separate services on separate ports, and reaching one through the modem proves nothing about the other; each forwarded port needs its own rule and each service its own listener.

If the panel's web pages load through the modem, the path, the port 80 rule and the web server all work — and nothing more. Modbus TCP on 502 needs its own listener in the panel and its own forwarding rule in the modem, because forwarding one port never carries another. A ping reply is equally limited: it proves the IP path only, the same reason HMI programming software needs a ping reply to download and can still fail to connect afterward — the path is up while the service is unproven. Use the browser and ping as coarse reachability checks, then let the modem-path poll from the layered test be the one that proves Modbus TCP.

When is a missing gateway address not the cause? #

Check three other causes once the gateway is set: a modem that source-NATs forwarded traffic, a client timeout tighter than the cellular round trip, and a second master contending with the HMI on the same network.

Source NAT first. Some modems rewrite the source address of forwarded packets to their own LAN address, so the panel sees an on-subnet client and replies straight back without ever consulting its gateway field. A site where the modem passes the client's real public address through is the site that exposes the blank gateway, which is why identical panel settings can work at one site and time out at another — set the gateway everywhere and the difference stops mattering.

Timeout second. Measure the round trip through the modem with the test client across twenty polls and set the SCADA client's timeout to at least twice the worst reply you saw; a worst case of 400 ms means 800 ms or more. The factor of two is working margin over cellular's variability, and it moves with signal conditions, so re-measure when the radio environment changes.

Conflict third. If a PLC master also polls the same network, timeouts can come from master contention rather than routing; the symptom pattern and the fix are in a Modbus timeout caused by a PLC master-slave conflict.

Questions asked

Can several clients poll the same HMI's Modbus TCP slave at the same time?

Modbus TCP is built for multiple connections, but the number of simultaneous client connections a given panel accepts is a device specification, not a protocol guarantee. Check the documented connection limit for your panel before pointing a SCADA server, a historian and a laptop test tool at it at once. On a cellular link, staggering their poll rates also keeps the measured round trip and your timeout margin under control.

Does the HMI need a static IP address for cellular polling?

The forwarding rule targets one LAN address, so the panel must keep that address across reboots and DHCP renewals. Enter a static IP address, subnet mask and gateway in the panel's network settings, or create a DHCP reservation for its MAC address in the modem. After any reboot, confirm the panel still holds the address before blaming the cellular path for a fresh failure.

Can the HMI's own polling of local drives slow the remote replies?

Yes, it can. The panel runs its master role to the local drives and its slave role to remote clients on the same processor and the same Ethernet path, so heavy local scan rates can add latency to slave replies. If remote timeouts persist after the gateway and port checks, trim local poll rates or move the slowest local exchanges off the fast scan group and re-measure the round trip.

If the HMI sits on its own subnet behind a router, which gateway address do I enter?

Use the gateway field of the first router, not the modem. The HMI sends off-subnet replies to the next hop on its own subnet, so a panel at 10.1.10.20 with mask 255.255.255.0 needs that router's 10.1.10.1 address in the gateway field. That router then needs its own route toward the modem, and the modem's forwarding rule must still reach the panel's address.

Keep reading

  • Troubleshooting

    Why HMI Indicators Stay Off Over Modbus RTU Polling

    Indicators on internal tags animate from HMI memory with no serial traffic; an indicator bound to a PLC tag needs a completed Modbus RTU read of the right address in the right data area. Confirm the PLC bit changes, then read the request and response, then fix the address at one known point.

    HMI and touchscreens

  • How-to

    Choosing a Data Path From an M580 PLC to FactoryTalk View

    RSLinx will show the M580 as an EtherNet/IP node once its EDS file is registered, but the tag browse stays empty because the controller presents no symbolic tag database over CIP. Pick the route from the tag structure: located %MW and %M data goes over Modbus TCP on port 502 or an EtherNet/IP assembly, and unlocated variables are only reachable through OFS serving OPC.

    Industrial networks

  • Troubleshooting

    Decoding Modbus holding register 4500001 from PLC to HMI

    Holding register 4500001 is a typed reference, not the address on the wire: the leading 4 marks the area, the rest is a 1-based register number, and under the six-digit convention it must fall inside 400001-465536, so the reachable target is 450001, protocol address 50000. Match the slave ID and 8E1 serial settings, prove the read with an independent master, then enter the address in the HMI driver's own convention.

    Industrial networks