IMDTouchKnowledge BaseShop main store

How-to

Exchanging HMI memory data with a custom PC application

HMI and touchscreens Published 6 min read

Short answer

Yes. The panel is the master and the PC program is the endpoint it polls: set the HMI project to Memory Link, then implement that command set, addressing and framing so every read and write the screen sends gets a valid answer. The exact model's communication manual supplies the frame format and memory areas; nothing else should be guessed.

On this page
  1. The screen polls; your program answers
  2. Pick the method: Memory Link or a PLC driver
  3. What the endpoint must implement
  4. Build the endpoint step by step
  5. Worked example: the number the PC must store
  6. Bench tests that prove both directions
  7. When values go stale or wrong
  8. Questions asked

Yes, a custom PC application can read and write the memory an HMI terminal displays, and the panel maker documents the way to do it. The screen is the master: it polls the memory areas its objects reference, and your program is the endpoint that answers each request. On terminals of the NS and NT class the mode built for a host-side program is Memory Link, published in the model's communication manual. That manual supplies the frames, the memory areas and the data encodings; this article supplies the method, the tests and the decisions around it.

The screen polls; your program answers #

Every object on the panel — a numeric display, a lamp, a bar graph, an input field — is bound to an address in a memory area. The terminal reads those addresses cyclically to refresh what it shows, and it writes operator entries back to the same kind of addresses. It does not expose the screen as pixels or label text; the exchange is data memory, and only data memory.

That is why the classic trick works: write the program to behave like the controller the panel expects. The panel cannot tell what sits at the other end of the line; it can only tell whether the frames conform. So the PC program is, at heart, a small addressed database plus a frame handler, with one hard rule: every request gets a valid reply inside the communication timeout the project configures.

Decide this before writing any code, because it decides what your program must speak. With no PLC in the project, set the panel's communications method to Memory Link: that mode exists precisely so a host computer can be the data endpoint.

Project situation Method to set What the PC program does
No PLC; the PC is the only data source Memory Link Implements the Memory Link command set and answers the panel's polls
A real PLC already serves the screen Keep the PLC driver Nothing new on the panel; the PC reads and writes the PLC over the PLC's own protocol
The PC must sit on the panel's existing PLC link PLC protocol emulation Reproduces the full PLC protocol the driver expects — more work than Memory Link, worth avoiding

The middle row is the one people miss: when a real PLC already serves the screen, the shortest path is the PC reading that PLC directly — a job for which open-source packages such as AdvancedHMI already cover common controllers — leaving the panel untouched.

One distinction keeps this clean: the way a project downloads to the panel and the way the running panel talks to equipment are separate settings, the same separation covered in separating HMI transfer method from PLC driver selection.

And if the real goal is visualization on the PC rather than feeding an existing panel, compare panel PC HMI or PLC plus HMI for meter data display before committing to a custom endpoint.

What the endpoint must implement #

From the manual, your program needs:

  • Frame parsing and frame generation exactly as documented: the header, memory area, address, length, data and terminator or check fields that model uses.
  • Reads answered out of a served memory map, and writes accepted, stored and acknowledged.
  • Replies inside the project's communication timeout, on a listener thread of their own, so database calls or screen updates cannot push an answer past the deadline into an error.
  • An address-and-operation list taken from the panel project: each address, its data type (bit or word), and whether operators write it.
  • Interface parameters — serial settings, or IP address and port — read from the manual for that model and interface, never inferred from the protocol's name.

Framing is where endpoints like this fail first. PC-side communication libraries live by the same rule, where exact line framing decides whether a reply is recognized at all.

Build the endpoint step by step #

  1. Identify the exact terminal model and its interface — authoring software differs by line, and Omron's NB series is configured in NB-Designer, a free download from the manufacturer's site — then get that model's communication manual, starting with how to find the right HMI manual for your panel, and read the Memory Link chapter end to end.
  2. Choose the endpoint's role from the table above; with no PLC in the project, plan for Memory Link.
  3. In the panel project, set the communications method and the interface that will carry it, and record the interface parameters exactly as the manual states them.
  4. Build the address-and-operation list: every object's address, data type and direction, with the operator-written entries marked.
  5. Implement the endpoint around the served memory map, with the dedicated listener thread and a frame log that timestamps everything sent and received.
  6. Start the PC endpoint first, then download the project to the panel.
  7. Run the read, write and interruption tests below on test tags only.
  8. Bind production objects only after both directions pass for every data type on the list.

Worked example: the number the PC must store #

Illustrative example with round numbers. A numeric display object is formatted with two decimal places and must show 40.00. The word behind it holds an integer count, so the endpoint answers with 40.00 × 100 = 4000, which is 0x0FA0 as a 16-bit value (15 × 256 + 10 × 16 = 4000). If the panel shows 4000 instead, the stored word and the object's decimal format disagree: keep the word at 4000 and set the object to two decimals.

The reverse direction: an operator types 12.34 into the input field, and the write must land in your program as 12.34 × 100 = 1234. A near miss such as 123 or 12340 points to the decimal format or the data type, not to delivery. Signed 16-bit values (IEC 61131-3 INT, -32768 to +32767) and single bits are separate tests, and so is encoding: log the frame for one known value and confirm its byte order against the manual before wiring the whole tag list.

Bench tests that prove both directions #

  • Read test: put a known value in the endpoint and confirm the object displays it.
  • Write test: enter a distinct value through the input object and confirm the endpoint's log records exactly that value at that address.
  • Interruption test: stop the endpoint, let the panel raise its communication error, restart the endpoint, and confirm values refresh with no change to the project; a final counter readout proves the catch-up.
  • Per-type rule: one read and one write test for each data type on the list — bits, unsigned words, signed words — before production tags go in.

Run the write tests on the bench with the machine disconnected: a write that lands in the wrong word travels straight into whatever the machine acts on.

When values go stale or wrong #

Observation Where the fault lives Next check
No request reaches the PC Transport or panel communications setup Interface selection, wiring, and whether serial or port settings match the project
Requests arrive but the panel errors or shows stale data Protocol handling Reply framing and encoding against the manual, and reply time against the timeout
Everything else works, one object is wrong Object binding That object's address, data type and decimal format
Values freeze only when the PC is busy Timing Move the listener off the UI thread; the reply is arriving after the timeout

The frame log is the instrument here: it shows which side of the boundary the failure sits on before you touch a single tag.

Questions asked

Does the PC poll the touchscreen, or does the touchscreen poll the PC?

The terminal polls; your program answers. Every exchange starts as a request from the screen, so an unsolicited push from the PC has nowhere to land. If the application needs to send a new value, it updates the value in its own memory and the next poll carries it to the display.

Can one PC program serve several panels?

Yes, when each panel gets its own transport or connection and its own answered session. The panels do not coordinate with one another, so serve each independently, and give each its own memory map unless you deliberately want several screens mirroring the same values.

Is Memory Link compatible with a Modbus library?

No. Memory Link is the terminal maker's own protocol, with its own framing, addressing and command set, so a Modbus master or slave routine will not answer it. Using Modbus instead means choosing a panel and communications method that document Modbus as the supported option.

Why does the screen show a communication error as soon as my program stops?

That is expected behavior, not a project fault: the panel polls continuously, and when nothing answers within its timeout it raises the error while objects hold their last values. Restart the endpoint and confirm the displays refresh without changing anything in the panel project.

How do I confirm an operator's entry reached the PC?

Write a distinct test value through an input object; 12.34 on a two-decimal field should arrive as the count 1234. Check the endpoint's log for that exact number at that address. A near-match points to scaling or data type, not to delivery.

Keep reading

  • How-to

    How to Make One HMI Button Read and Write Two PLC Bits

    Enable the button's write/read offset address and point it at the HMI internal word 0. With the word at 0 the button reads and writes X0; with the word at 1 the same button reads and writes X1. The offset is resolved inside the HMI before any request reaches the PLC.

    HMI and touchscreens

  • Troubleshooting

    Why HMI Objects Show White Boxes Only on Populated Pages

    Objects show a white box with a red border when the panel's optimized grouped read for that page spans a register the PLC never assigned; the same object reads fine alone because its single request stays inside assigned addresses. Recalculate the published variable addresses in EcoStruxure Machine Expert HVAC so the range has no gaps, reimport the mapping into Operator Terminal Expert, and download the controller and panel projects together.

    HMI and touchscreens

  • How-to

    Editing a Delta DOP HMI project without breaking PLC comms

    Downloading a revised project to a Delta DOP panel replaces only the panel's project; the PLC program and its port configuration are untouched. The link survives because the driver and serial parameters are stored separately in each device and a revision leaves them matching. Record both sides first, then prove read and write after the download.

    HMI and touchscreens