Troubleshooting
Why an Edge app writes no value to a Unified Comfort tag
Short answer
The shown code never issues a runtime write: it assigns a local JavaScript variable, compares a property the returned tag object does not carry, and prints to the developer console. Prove the connection on a PC runtime, select the tag by its returned name property, submit the string "19" through the documented OpenPipe write, and confirm it with a runtime readback.

On this page
Nothing changes on the panel because the application never writes to the runtime tag. The fragment assigns a JavaScript variable with let tag3 = 19;, compares a property the returned tag object does not carry, and prints to the developer console; no line calls the OpenPipe write operation, so the tag keeps its old value and the I/O field shows nothing new. The repair has three parts: prove the runtime connection on a PC runtime, select the tag through the property the response actually carries, and submit a string such as "19" with the documented write, then read the tag back. Work through the checks below in order; each states what to run and what a pass looks like.
What the code actually does #
An HMI tag is a value held by the WinCC Unified runtime; a JavaScript variable is a value inside the app's own process. Identical names do not link the two. The I/O field reads the runtime tag, and only a write through the runtime interface changes what the field displays.
The fragment performs four actions, and none of them is a write:
let tag3 = 19;creates a JavaScript number in the app's memory. The runtime tag of the same name is untouched.tagsReadCompleted.push(tagData.Name);copies an identifier from each returned object into a local array, which shows that the response names a tag through itsNameproperty.if(tagData.tagData === "tag3")reads a property calledtagDataon an object that carries its identifier underName. Property access in JavaScript is case-sensitive, and reading a missing property returnsundefinedinstead of throwing an error;undefined === "tag3"evaluates false, so the branch is skipped for every tag with no message to warn you.console.log("tag3 is:" + tag3);prints the local variable to the developer console. The panel screen never receives it.
Test the connection on a PC runtime first #
Separate application logic from the panel deployment before touching the Industrial Edge Publisher configuration. Run the app locally against a WinCC Unified PC runtime loaded with the same three WString tags, and put the diagnostics where the connection actually happens:
- Add a log line directly after
ConnectRuntime.Connect((runtimeClass) => {that reports the callback was entered. - Request the tag information the way the SendMail example does, with the tags read from a list called
tagsListthrough the OpenPipe API, and print each returned object in full rather than a value assembled on your side. - Compare the printed values with the I/O fields on the PC runtime screen.
A pass looks like this: the callback fires, and the returned objects expose tag3, tag4 and tag5 with the values currently on screen. If the callback never runs, stop and fix the connection, because no write can succeed without it and no tag-selection change will help. If it passes, the logic and the runtime interface are sound, and a silent panel points at the deployment path, not this code.
Select the tag by its returned name property #
Print first, compare second. Once the printed object shows the identifier under Name, select with tagData.Name === "tag3". If the response for your installed environment uses a different structure, follow that structure rather than adding a guessed property name. Log the selected name before writing anything: the selection branch must run for tag3 and for nothing else.
Convert the value and issue the write #
WString is a wide-character string type, so the tag holds characters while let tag3 = 19; produces a number. Convert explicitly instead of trusting an implicit conversion somewhere downstream:
// Local preparation only; these lines do not write an HMI tag.
let tag3 = 19; // JavaScript number, value 19
const valueForRuntime = String(tag3); // string "19" for the WString tag
Then call the write operation the OpenPipe interface documents for the installed runtime, passing valueForRuntime as the new value of tag3, and handle its completion and error reporting. Take the exact call and argument order from the documentation for your application environment: the example's tag path only reads tagsList, so it cannot serve as the template for this step.
Prove the write with a read, not a log line. After the write reports completion, read tag3 back through the same interface and print what the runtime returns. The test passes when the readback equals the submitted string and the I/O field shows 19.
When the field still shows nothing #
If the readback returns the new string but the screen does not move, the write works and the display path is at fault. Two checks cover it:
- Field binding: an I/O field displays the tag it is configured for, not a variable that happens to share a name. Open the field's properties and confirm it points at the same runtime tag the app wrote.
- Font character set: WinCC Unified makes only the characters configured for a font available to WString texts, so a value that exists only at run time can render blank where a character was never included. Add the characters the app will send to the font's configured set.
Deploy to the panel and repeat the checks #
With the app reading and writing tag3 on the PC runtime, repeat the identical sequence with the deployed app on the Unified Comfort Panel. Publication success proves delivery to the Edge Management and nothing more: the Industrial Edge Publisher takes the address of an Industrial Edge Management in its "Edge Management URL" input field, and a completed publication says nothing about the app's runtime endpoint, connectivity or access settings at run time. Compare the deployed configuration against the working local test line by line.
If the app never gets far enough to attempt a write, the fault sits earlier in the chain. An app that will not install on the panel is covered in why an Edge app fails to install on a Unified Comfort Panel, and one that installs but never starts is covered in why an Industrial Edge app does not autostart on a Unified Comfort Panel.
The decision for each case #
- Callback never fires on the PC runtime: the connection is broken. Fix the runtime endpoint and access settings first; selection and conversion are irrelevant until a read works.
- Callback fires and the tag list prints correctly: the interface is fine. Change the comparison to
tagData.Name, convert the value to a string, and add the documented write, because the missing write is the root cause. - Local write and readback succeed but the panel stays silent: the code is finished. Correct the deployment configuration against the working local setup.
- Panel readback returns the submitted string and the field stays blank: the write path is finished. Fix the field binding or the font character set, whichever the checks above exposed.
Questions asked
The app variable and the HMI tag are both called tag3. Why does the shared name not connect them?
The runtime owns the tag: it holds the value between app restarts and supplies every screen element bound to it. The JavaScript variable exists only while the app process runs and is invisible to the runtime. The only link between them is the write through the runtime interface, never the shared name.
Should tag3 be changed from WString to a numeric data type?
Yes, when the panel must calculate with the value or archive it as a number, because a string cannot be used arithmetically in the runtime without conversion. Change the data type in the engineering project, then update every I/O field, script and archive that uses the tag. Keep WString when the field legitimately shows text; WChar is the related single-character type.
The written value appears and then reverts on its own. What overwrites it?
A second writer. Read tag3 again several seconds after the write: a changed readback with no operator action points to a cyclic script, a controller connection or an operator entry writing the same tag. The tag's connection configuration shows which owner applies, since internal tags and externally connected tags are managed differently. Remove or retime that writer instead of repeating the app write.
Can two Edge apps exchange these tag values without the OpenPipe interface?
Yes. The WinCC Unified Runtime can publish its HMI tags on the Industrial Edge Databus, where another Industrial Edge application can consume them. That path distributes values between applications; the panel's I/O field still displays the runtime tag it is bound to. Use the Databus for app-to-app exchange and the runtime write for values an operator must see on screen.


