# Logging Tag Change Origin

**URL:** <https://forum.inductiveautomation.com/t/logging-tag-change-origin/15518>\
**Category:** Ignition\
**Created:** [September 30, 2017, 6:45am UTC](https://forum.inductiveautomation.com/t/logging-tag-change-origin/15518 "2017-09-30T06:45:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AIO](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aio/32/87549_2.png) [@AIO](https://forum.inductiveautomation.com/u/AIO)\
**Post date:** [September 30, 2017, 6:45am UTC](https://forum.inductiveautomation.com/t/logging-tag-change-origin/15518/1 "2017-09-30T06:45:42Z")

</div>

Hey folks,

I have a system that users change setpoints from both PanelViews in the field and Ignition in the office. I’m already logging changes made from within Ignition and I am looking for a way to track which setpoint changes originate from the PLC.

Is there a way to monitor whether a tag change originates at the PLC or Ignition?

Many thanks.

---

<div class="post-metadata">

**Author:** ![cmisztur2](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmisztur2/32/4243_2.png) [@cmisztur2](https://forum.inductiveautomation.com/u/cmisztur2)\
**Post date:** [September 30, 2017, 2:26pm UTC](https://forum.inductiveautomation.com/t/logging-tag-change-origin/15518/2 "2017-09-30T14:26:53Z")

</div>

From a programmatic point of view, since you’re already logging Ignition made changes then you’re halfway there. Any other tag change events that are fired would be from the field.

---

<div class="post-metadata">

**Author:** ![AIO](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aio/32/87549_2.png) [@AIO](https://forum.inductiveautomation.com/u/AIO)\
**Post date:** [September 30, 2017, 3:01pm UTC](https://forum.inductiveautomation.com/t/logging-tag-change-origin/15518/3 "2017-09-30T15:01:23Z")

</div>

Theoretically, but I’m using a series of update queries on button scripting to log what settings are being sent by the user. It’s not actually logging changes made by ignition, so much as buttons pushed by users and the associated data.

Perhaps this too can be improved.

---

<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:** [September 30, 2017, 3:49pm UTC](https://forum.inductiveautomation.com/t/logging-tag-change-origin/15518/4 "2017-09-30T15:49:24Z")

</div>

Look at Ignition’s built-in [auditing](https://docs.inductiveautomation.com/display/DOC79/Using+Audit+Profiles) capabilities.

---

<div class="post-metadata">

**Author:** ![AIO](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aio/32/87549_2.png) [@AIO](https://forum.inductiveautomation.com/u/AIO)\
**Post date:** [September 30, 2017, 4:06pm UTC](https://forum.inductiveautomation.com/t/logging-tag-change-origin/15518/5 "2017-09-30T16:06:27Z")

</div>

You know, I expected the answer to be simple, but not that simple.

Thank you, Phil.

---

<div class="post-metadata">

**Author:** ![AIO](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aio/32/87549_2.png) [@AIO](https://forum.inductiveautomation.com/u/AIO)\
**Post date:** [September 30, 2017, 4:14pm UTC](https://forum.inductiveautomation.com/t/logging-tag-change-origin/15518/6 "2017-09-30T16:14:43Z")

</div>

Phil,

On further reading, it appears to only log ignition events? If so, thats a great start, but is there any way to isolate the plc events, other than cross-refrencing tag history and audit log and eliminating the ignition events?

Edit: Ideally, if a tag changed and the source was not ignition, I’d like to log to that same audit table. The query seems simple enough, but isolating a reliable trigger escapes me.

---

<div class="post-metadata">

**Author:** ![AIO](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aio/32/87549_2.png) [@AIO](https://forum.inductiveautomation.com/u/AIO)\
**Post date:** [September 30, 2017, 4:33pm UTC](https://forum.inductiveautomation.com/t/logging-tag-change-origin/15518/7 "2017-09-30T16:33:11Z")

</div>

It appears as though this post addresses some of my questions, will start exploring options similar to the advised solution in conjunction with Audit logging.

> [@Tag Value change event log in audit\_events table](http://forum.inductiveautomation.com/t/tag-value-change-event-log-in-audit-events-table/9241/23):
>
> Hi Pat and JordanCClark, Thank you for the code, laughing I have perpared the code as per attached and It is working fine. Also please refer Event log sanpshot. I want to understand below few points. I have comparing initialChange bit status in the Tag value change event script. Hence the false (unnecessary) events were not logged at the time, when I SAVE and PUBLISH the project. A. But I am getting unnecessary events logged, in database when I change or modify the UDT. Is there any prov…
