Gateway Tag Change Script with UDTs

I have several UDT instances that represent lighting panels, and each has 30 departments (also UDTs) with their own schedule data, both from the PLC, as well as query tags from the database.

I need to sync the schedules between the PLC and DB when a local schedule change is made at the PLC. Initially, I used tag change scripts to run named queries and update the table, but this doesn't seem like a good idea, especially with so many tags.

What's the best way to handle this? With a Gateway Tag Change script, would I have to specify the paths for every single tag to be monitored? I tried monitoring just the UDTs, but I don't know if I can get the path of the lower level tag that changed from the event object.

The structure of my UDT is:

  • Lighting Panel 1
  • Department_1
    • DB_Schedule
      • On_Hour
      • Off_Hour
    • Panel_Schedule
      • On_Hour
      • Off_Hour
        ...

Have you considered using bidirectional transaction groups? They could be set to execute on tag changes.

Frank

1 Like

I'll give that a shot!