# TCP driver: clear tag after read

**URL:** <https://forum.inductiveautomation.com/t/tcp-driver-clear-tag-after-read/35243>\
**Category:** Ignition\
**Created:** [June 2, 2020, 10:52am UTC](https://forum.inductiveautomation.com/t/tcp-driver-clear-tag-after-read/35243 "2020-06-02T10:52:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [June 2, 2020, 10:52am UTC](https://forum.inductiveautomation.com/t/tcp-driver-clear-tag-after-read/35243/1 "2020-06-02T10:52:59Z")

</div>

We have an RFID tag reader that works over a TCP socket. Whenever it reads a tag, it sends the stringified RFID info to the TCP listener.

So we tried to handle it as a TCP device in Ignition. It works pretty well: whenever a tag is read, I get a value change, and can run a script to handle the tag read.

However, I can’t find how to detect two subsequent reads of the same tag. As far as I can see, the tag reader just sends the same string to the TCP socket, but the Ignition tag doesn’t get updated so I don’t get a value change anymore.

Is there a way to clear the tag after reading it? So I can detect a new incoming message? Or is there another way to detect a new read with the same data?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 2, 2020, 12:38pm UTC](https://forum.inductiveautomation.com/t/tcp-driver-clear-tag-after-read/35243/2 "2020-06-02T12:38:24Z")

</div>

> [@Sanderd17](#):
>
> Or is there another way

Write your own socket code. (I _ **never** _ use the UDP/TCP driver. For multiple reasons.)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [June 2, 2020, 1:11pm UTC](https://forum.inductiveautomation.com/t/tcp-driver-clear-tag-after-read/35243/3 "2020-06-02T13:11:05Z")

</div>

Phil’s right, you probably need to do this with your own socket code from scripting or a module.
