Hi,
I would like to communicate with my PLC via Modbus TCP. As I will have several variables, to optimize and facilitate, I thought about using UDTs.
However, I encountered some difficulties:
1- I am totally dependent on my address. When I register it on the gateway, I cannot prevent it from appearing at the end, which defeats the purpose of using a UDT. If I have another PLC, I cannot reuse the UDT tags and need another UDT.
If I change the address, I will have to change it in the PLC, the gateway, and the UDT. If it were passed at the end by parameter {pump1}, I would use a single UDT, always associated with pump 1 or pump 2, not the address. For the same reason, I did this in my MQTT UDT.
Ex:
2 - Looking at the forum, I found two ways to do it, but I don't know which one is best. Whether it's creating it through the gateway or creating it directly in the tag. Even so, it comes back to the UDT issue, which I'm lost on.
and creating through the gateway, I couldn't read two consecutive addresses ;-;
Created at the gateway:
Directly in the tag:
It's very likely that it's something simple that I'm not seeing.