I’m trying to create a custom data type based on a set of Modbus registers, which are somehow asymmetric, coming from C structures (all visible in the OPC resource tree).
Actually what I do have is a Modbus/TCP device, where I have mapped an array of structures into an array of registers. I have turned
uint16 registers[1 + 2 + 1 + 2]; so that first register is an extended version of “param1”, second and third are used for “param2” and so on. To summarize, 6 registers for each instance.
I could use the Device addressing configuration to have access to each field of each EXAMPLE, but considering I have an array of N EXAMPLEs, creating a type which only needs to know the starting offset in the array of registers would be far easier.
What I can do now is to define N areas in the Modbus driver configuration so that each one references the starting register of a EXAMPLE, assuming there’s a way to create a data type capable of decoding the information that’s been received after this offset.
And the question, is there any way to do something like that?