# Igniting writing a null to plc tag (string)

**URL:** <https://forum.inductiveautomation.com/t/igniting-writing-a-null-to-plc-tag-string/64816>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 4, 2022, 8:06pm UTC](https://forum.inductiveautomation.com/t/igniting-writing-a-null-to-plc-tag-string/64816 "2022-10-04T20:06:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dparks](https://avatars.discourse-cdn.com/v4/letter/d/9de0a6/32.png) [@dparks](https://forum.inductiveautomation.com/u/dparks)\
**Post date:** [October 4, 2022, 8:06pm UTC](https://forum.inductiveautomation.com/t/igniting-writing-a-null-to-plc-tag-string/64816/1 "2022-10-04T20:06:31Z")

</div>

I am trying to figure out why, when a string tag goes blank, a "null" is written as a value. Can one help me to understand the reasoning behind that.

Thanks

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [October 4, 2022, 8:50pm UTC](https://forum.inductiveautomation.com/t/igniting-writing-a-null-to-plc-tag-string/64816/2 "2022-10-04T20:50:52Z")

</div>

What type of tag is it? OPC? Memory? Expression? Query?  
What it's the source of the tag value?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [October 4, 2022, 10:07pm UTC](https://forum.inductiveautomation.com/t/igniting-writing-a-null-to-plc-tag-string/64816/3 "2022-10-04T22:07:13Z")

</div>

Without understanding how the "write" is occurring we won't be able to help you. Is there a bidirectional binding at play? A script? Is it an expression tag?

---

<div class="post-metadata">

**Author:** ![dparks](https://avatars.discourse-cdn.com/v4/letter/d/9de0a6/32.png) [@dparks](https://forum.inductiveautomation.com/u/dparks)\
**Post date:** [October 5, 2022, 3:06pm UTC](https://forum.inductiveautomation.com/t/igniting-writing-a-null-to-plc-tag-string/64816/4 "2022-10-05T15:06:52Z")

</div>

It is an OPC tag connection through Kepsever that is map to a AB PLC. There is no bidirectional binding, script, or expression tag at play.

What happen is when a trouble event happens, plc writes something like "Trouble at Station xxx" and this is displayed until the trouble is cleared. In the plc once the trouble is cleared it clears the tag leaving it empty. So the PLC tag itself shows empty, but the value in the tag browser in ignition designer show null.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [October 5, 2022, 4:16pm UTC](https://forum.inductiveautomation.com/t/igniting-writing-a-null-to-plc-tag-string/64816/5 "2022-10-05T16:16:33Z")

</div>

> [@dparks](#):
>
> In the plc once the trouble is cleared it clears the tag leaving it empty.

Try an expression transform on the tag - something like

```auto
if(isNull({value}), "", {value})

```

This would replace a null with an empty string (which is not the same thing!).
