IMDTouchKnowledge BaseShop main store

Troubleshooting

Why HMI Objects Vanish in Online Simulation Over Modbus

HMI and touchscreens Published 6 min read

Short answer

Objects bound to Modbus vanish in Online Simulation because the simulation PC cannot complete the read each object needs before it can draw a state. A momentary switch still appears because a press issues a write with no prior read. Put the PC on the controller's subnet, confirm TCP port 502 is reachable, free the controller's client slot, and prove one read from the PC before changing the project.

On this page
  1. Why Online Simulation drops the objects
  2. Give the simulator a path to the controller
  3. Worked example: the subnet that hides the controller
  4. Checks in the order that isolates the fault
  5. Match the object to the Modbus map
  6. What each symptom decides
  7. Questions asked

Your project is fine. Objects bound to Modbus vanish in Online Simulation because the simulation PC never completes the read each value-driven object needs before it can draw a state, so the runtime draws nothing. The momentary switch still appears because a press issues a write and never asks the controller for the current value first. Offline Simulation shows every object because it never opens the device connection at all. The fix is on the PC side of the link: put the PC on the controller's subnet, confirm TCP port 502 is reachable, free the controller's client slot, and prove one read from the PC before you change a single object.

Why Online Simulation drops the objects #

In Weintek EasyBuilder Pro, Offline Simulation and Online Simulation differ in one decisive way: Offline never opens the device connection, Online opens it from the PC. Offline draws every object from default values, which is why your toggles, lamps, and displays all appear there. Online has to exchange real data, using the PC's own network interface and IP address rather than the panel's.

The objects themselves differ in what they need before they can draw:

  • A momentary switch is write-only. Press writes ON, release writes OFF, and its idle graphic does not depend on the coil's current value.
  • A toggle, lamp, or numeric display is read-driven. It must obtain the current value first, to select a state graphic and, for a toggle, to decide what the next press should command. Until a read returns good data there is no state to draw; if the object's visibility is driven by the same unread value, the runtime suppresses it outright.

That asymmetry explains the symptom exactly. Reads and writes are separate Modbus operations, so a press that lands a write proves nothing about the read path: a controller can accept the write while reads fail on the data area, the address, or the connection itself. The same failed-read mechanism is why HMI indicators stay off over Modbus RTU polling on serial links, where the lamp has no value to show and shows nothing.

Give the simulator a path to the controller #

Online Simulation runs on the PC, so three PC-side conditions must hold before any bound object will draw:

  • Subnet. The PC must sit on the controller's subnet or have a route to it. If the Ethernet cable runs only between the panel and the controller, the simulator has no path at all; put all three devices on one switch, or test that link by downloading the project to the panel.
  • Port. Modbus TCP listens on TCP port 502, the registered service port. A successful ping proves nothing here, because ping is ICMP and a controller can answer ping while 502 is filtered or closed. Test a TCP connect to the controller's address on 502 from the PC.
  • Client slot. Embedded Modbus TCP servers accept a limited number of simultaneous clients, and some accept only one. If the panel already holds the connection, the simulator's read is refused. Disconnect the panel and run Online Simulation again.

Then prove the read from the PC before touching the project: with a PC Modbus test client, read the same coil the momentary switch writes, change that coil at the controller, and watch the value follow in both directions. One safety note belongs here: a test client can command real outputs, so do this with the machine in a safe state and read an observed or spare coil rather than an actuator. The procedure for testing HMI simulation against a live PLC is built on exactly this distinction between the panel's link and the PC's.

Worked example: the subnet that hides the controller #

The panel and controller communicate, but Online Simulation drops every bound object. The PC is 192.168.0.50, the panel 192.168.1.10, the controller (an Arduino Opta in this case) 192.168.1.100, all with mask 255.255.255.0.

  • PC network: 192.168.0.50 AND 255.255.255.0 = 192.168.0.0
  • Controller network: 192.168.1.100 AND 255.255.255.0 = 192.168.1.0
  • 192.168.0.0 does not equal 192.168.1.0, so the PC and controller sit on different subnets with no gateway between them and every read times out.

Set the PC to 192.168.1.50:

  • 192.168.1.50 AND 255.255.255.0 = 192.168.1.0
  • 192.168.1.100 AND 255.255.255.0 = 192.168.1.0
  • Equal networks, so direct delivery is possible.

Decision: give the PC any free host address on 192.168.1.0/24 and test the read again. If reads still fail with the subnet correct and ping working, only two causes remain, port 502 and the client slot, and both are checked from the PC without changing the project.

Checks in the order that isolates the fault #

  1. Run Online Simulation with one static object and one Modbus-bound object on the same screen. If the static object draws, the screen loaded and the fault is the bound object's read.
  2. Compare the PC's address and mask against the controller's, using the subnet arithmetic above.
  3. From the PC, test TCP connectivity to the controller on port 502.
  4. Disconnect the panel and rerun Online Simulation; a read that starts working means the controller's server had no free client slot.
  5. From a PC Modbus test client, read the coil the working momentary switch writes, toggle it at the controller, and confirm the client sees both states.
  6. Open the momentary switch's address configuration and record the device (the MODBUS TCP/IP entry defined on the Device tab), the data area, and the address; give the toggle exactly those three values.
  7. Remove visibility expressions, security, and animation from the test object, and give both Boolean states distinct graphics so either returned value is visible.
  8. Download the minimal screen to the panel. If the panel runs it and Online Simulation does not, the project is correct and the PC path is the fault.

Match the object to the Modbus map #

Data area first. A bit object belongs on a coil (0x references); a numeric display belongs on a holding register (4x references) with a data format matching the controller's value. A toggle that must command and read back a Boolean state needs a coil that is both writable and readable, and pointing it at a register fails in ways that look exactly like a communication fault.

Then the base convention. Modbus documentation is 1-based, with 00001 and 40001 as the first coil and first holding register, but the protocol on the wire is 0-based: coil 00005 travels as reference 4 (5 minus 1 = 4). If the editor sends what you type as a 0-based reference, typing 5 reads reference 5, which is coil 00006, so the read completes and shows the wrong state instead of no state. Subtract 1 from every documented address in that convention, use one base for every object on the device, and verify the first address against a coil you can change at the controller and watch move.

Finally, test the object stripped: no visibility expression, no interlock, and distinct graphics for both states. Add each behavior back only after the raw read displays correctly in both directions.

What each symptom decides #

Symptom Fault area Action
All Modbus objects vanish online, appear offline PC-to-controller read path Subnet, port 502, client slot, in that order
Momentary switch works, toggle never appears Read of that coil never completes Read the same address from a PC test client
Panel runs the screen, Online Simulation does not Simulation PC route or adapter Move the PC onto the controller subnet
Panel and simulator both fail the same object Device, data area, address, or controller map Compare against a known changing value
Only some states disappear State graphics or visibility expression Strip visibility, redraw both states

The decision in one line: objects that vanish only in Online Simulation are a PC-path problem, meaning subnet, port 502, or client slot, until a read from the PC proves otherwise, and the project gets changed only when the panel fails the same object on its own link.

Questions asked

Why does the momentary switch appear when the toggle on the same screen vanishes?

A momentary switch is write-only from the display side: pressing it writes ON and releasing it writes OFF, and neither action needs the coil's current value to choose a graphic. A toggle must first read the coil to know which state to draw and what the next press should command. When that read never completes, the toggle has no state to draw, so it draws nothing.

Does a successful ping prove Modbus TCP will reach the controller from the PC?

No. Ping uses ICMP, not TCP, so it proves routing only. Modbus TCP needs a TCP connection to port 502 on the controller and a free slot in its server. If the panel already holds the only connection the server accepts, ping still succeeds while every read is refused. Prove the path with an actual read from a PC Modbus test client before trusting it.

Offline Simulation shows every object. Is the project still broken?

No. Offline Simulation validates graphics, layout, and state configuration without opening the device connection, so every object renders from defaults. It proves nothing about addresses, data areas, or the network path. Treat it as a drawing check: when a screen passes offline and fails online, the difference is on the communication side, and the PC's route to the controller is the first thing to test.

The downloaded panel runs the screen fine, but Online Simulation drops the objects. Do I edit the project?

No. The panel talks to the controller over its own link and IP address; Online Simulation talks over the PC's interface and IP. A working panel proves the project's device, data area, and addresses, and leaves only the PC's subnet, its route to port 502, and the controller's client limit in question. Fix the PC path and leave the project alone.

How do I stop the address base from shifting objects by one coil?

Modbus documentation is 1-based (00001, 40001) but the protocol on the wire is 0-based: coil 00005 travels as reference 4. Pick one convention for every object on the device and derive each number the same way, then confirm the first address by changing that coil at the controller and watching the object follow. An off-by-one read usually completes and shows the wrong state rather than nothing.

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

    Connecting an XBTGT HMI to an M241 PLC over Modbus TCP

    Delete the Generic Modbus TCP slave from the M241 device tree and activate the Modbus server on the controller's Ethernet interface instead — that slave makes the M241 a client, so both devices poll and neither answers. Then map Vijeo Designer driver address 40001 to PLC word %MW0, keep TCP port 502 open between panel and controller, and shift the address map by one word if a test read lands one register off.

    HMI and touchscreens

  • Troubleshooting

    Fixing HMI Modbus Device No Response Over RS-485

    Device no Response means the slave never returned a valid frame to that request. When a PC polling tool reads the same scanner, the bus is probably carrying two masters: run one master at a time, then copy the known-good read's serial settings, station address, and register offset into the HMI.

    HMI and touchscreens