# PCL Tag Write Question

**URL:** <https://forum.inductiveautomation.com/t/pcl-tag-write-question/31459>\
**Category:** General Discussion\
**Created:** [January 21, 2020, 12:29pm UTC](https://forum.inductiveautomation.com/t/pcl-tag-write-question/31459 "2020-01-21T12:29:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![keith.hyder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/keith.hyder/32/4909_2.png) [@keith.hyder](https://forum.inductiveautomation.com/u/keith.hyder)\
**Post date:** [January 21, 2020, 12:29pm UTC](https://forum.inductiveautomation.com/t/pcl-tag-write-question/31459/1 "2020-01-21T12:29:41Z")

</div>

I am trying to write a value to a Siemens PLC through an ignition tag. The PLC Address data type is string. My Ignition tag is string. OPC Server and Item Path are mapped correctly. My simple test has a window with a label that was created from the gateway tag which shows the current value. I have a popup calendar which is set to display only time, and a button to initiate the write. Below is the button code.

```auto
date = system.date.format(event.source.parent.getComponent('Popup Test').date, "HH:mm")
print(date)
system.tag.write("[default]Asheville_ANDON/HPLRF_ANDON/System_A/Schedule/Time_Text.value",date))

```

When I select a time and click the button It changes the tag value and writes to the PLC location as well, but I still keep getting the following error even though it is working on all accounts.

Error writing to tag ‘[default]Asheville\_ANDON/HPLRF\_ANDON/System\_A/Schedule/Time\_Text.value’: Bad\_Unsupported

Any Ideas?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![boyergary](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/boyergary/32/10316_2.png) [@boyergary](https://forum.inductiveautomation.com/u/boyergary)\
**Post date:** [January 21, 2020, 7:21pm UTC](https://forum.inductiveautomation.com/t/pcl-tag-write-question/31459/2 "2020-01-21T19:21:09Z")

</div>

Are you on Ignition 7 or 8? I tried your exact test in Ignition 7 and I did not get any error. Did you try without specifying the .value in the tag name? It works both ways for me.

---

<div class="post-metadata">

**Author:** ![keith.hyder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/keith.hyder/32/4909_2.png) [@keith.hyder](https://forum.inductiveautomation.com/u/keith.hyder)\
**Post date:** [January 22, 2020, 9:58am UTC](https://forum.inductiveautomation.com/t/pcl-tag-write-question/31459/3 "2020-01-22T09:58:22Z")

</div>

Ignition 8. I got it working by doing the following.

```auto
date = str(system.date.format(event.source.parent.getComponent('Popup Test').date, "HH:mm"))
system.tag.write("[default]Asheville_ANDON/HPLRF_ANDON/System_A/Schedule/Time_Text", date)

```

Basically adding the “str” eliminated the error for me even though the system.date. format should already be in a string format.

Thanks for checking for me.
