Getting time of the gateway into the PLC

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.

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

yes it is

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?

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

Have you seen this thread?
Syncing the Gateway Time to multiple PLC Clock times - Ignition - Inductive Automation Forum

3 Likes

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