# Getting time of the gateway into the PLC

**URL:** <https://forum.inductiveautomation.com/t/getting-time-of-the-gateway-into-the-plc/98857>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 20, 2024, 1:32pm UTC](https://forum.inductiveautomation.com/t/getting-time-of-the-gateway-into-the-plc/98857 "2024-11-20T13:32:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![RayC](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@RayC](https://forum.inductiveautomation.com/u/RayC)\
**Post date:** [November 20, 2024, 1:32pm UTC](https://forum.inductiveautomation.com/t/getting-time-of-the-gateway-into-the-plc/98857/1 "2024-11-20T13:32:59Z")

</div>

Hello, I'm trying to update a PLC tag in an Allen Bradly PLC with the time of the Gateway using now(). However, I can't seem to come up with a good way of writing to the PLC tag without converting it to a Memory Tag. The update just needs to be every sec. Thanks for the help in advance.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [November 20, 2024, 1:42pm UTC](https://forum.inductiveautomation.com/t/getting-time-of-the-gateway-into-the-plc/98857/2 "2024-11-20T13:42:28Z")

</div>

I would expect this to be a R/W enabled, OPC tag.

---

<div class="post-metadata">

**Author:** ![RayC](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@RayC](https://forum.inductiveautomation.com/u/RayC)\
**Post date:** [November 20, 2024, 1:43pm UTC](https://forum.inductiveautomation.com/t/getting-time-of-the-gateway-into-the-plc/98857/3 "2024-11-20T13:43:10Z")

</div>

yes it is

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [November 20, 2024, 1:45pm UTC](https://forum.inductiveautomation.com/t/getting-time-of-the-gateway-into-the-plc/98857/4 "2024-11-20T13:45:42Z")

</div>

You can't use an expression in an OPC tag. An expression is the source for the expression tag, and OPC is the source for an OPC Tag, you can't have two sources on the same tag.

You would write to the OPC tag for it to update, but doing this every second seems a little suspect. Does it drift that much?

---

<div class="post-metadata">

**Author:** ![RayC](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@RayC](https://forum.inductiveautomation.com/u/RayC)\
**Post date:** [November 20, 2024, 1:48pm UTC](https://forum.inductiveautomation.com/t/getting-time-of-the-gateway-into-the-plc/98857/5 "2024-11-20T13:48:41Z")

</div>

I was just needing a gateway clock in the PLC with a 1 sec accuracy

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [November 20, 2024, 1:49pm UTC](https://forum.inductiveautomation.com/t/getting-time-of-the-gateway-into-the-plc/98857/6 "2024-11-20T13:49:04Z")

</div>

Have you seen this thread?  
[Syncing the Gateway Time to multiple PLC Clock times - Ignition - Inductive Automation Forum](https://forum.inductiveautomation.com/t/syncing-the-gateway-time-to-multiple-plc-clock-times/43415)

---

<div class="post-metadata">

**Author:** ![RayC](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@RayC](https://forum.inductiveautomation.com/u/RayC)\
**Post date:** [November 20, 2024, 1:51pm UTC](https://forum.inductiveautomation.com/t/getting-time-of-the-gateway-into-the-plc/98857/7 "2024-11-20T13:51:10Z")

</div>

No, I have not I will take a look and see if I can use something out of it Thanks
