Are there any errors or warnings in the gateway logs?
On line 8 , tag_Value [0]
should be tag_value[0]
the extra space is likely causing issues.
Assuming you are using the same UDT for each pump (or similar UDTs for groups of pumps),
Gateway tag event scripts allow wildcards at the folder level when defining the tags to monitor.
Inside of the event script, you also have access to the full tag path of the tag that triggered the event, so you should be able to indirectly build the path to related tags without hard defining a list or a massive if...else
chain. Worst case is that you make 1 gateway event per UDT type.
Gateway Tag Change Event object
Finally, screenshots are great for showing context, but code should also be posted as preformatted text, to help speed up troubleshooting by allowing a simple copy/paste instead of having to read it from a screenshot. See Wiki - how to post code on this forum.