Dear Everyone,
I receive a TCP message as a byte array in Ignition and use a gateway tag change script to parse it into individual fields. These fields are then written to tags organized in a UDT. The parsing logic works, but it's not efficient when the message size is large (e.g., several kilobytes). Is there a better way to parse and map the byte array directly to a UDT structure?
If you're writing each tag individually it could be slower compared to building arrays of tags and values, then at the end of parsing a message, write them all at once with a single call.
Thanks for all response,
I'm looking for a more efficient solution to parse 8192 bytes of data from a TCP driver into a UDT instance. My current method is time-consuming and hard to maintain, even without considering performance. Is there a way to define a data format like a struct first, then parse all the MessageBytes into it?
But it installs a bunch of helpers and data type handlers in system.cip.* that could be useful to you. But first, you should try the ByteBuffer approach.