Hann
Member
I am using a function block that has a in/out parameter that is a structure.
The structure has an array as one of the elements.
I can index the elements in the array if I hard code it e.g. struct.array[0]
I want to index using a tag e.g. struct.array[index].
I get the following error
ERROR: In a structure variable, only one variable index can be used in the root struct array. Rung 73 (7,40).
Is there a way to accomplish dynamic addressing in a function block given this limitation.
I am investigating indirect registers, but are not yet familiar enough to know if it will work.
The structure has an array as one of the elements.
I can index the elements in the array if I hard code it e.g. struct.array[0]
I want to index using a tag e.g. struct.array[index].
I get the following error
ERROR: In a structure variable, only one variable index can be used in the root struct array. Rung 73 (7,40).
Is there a way to accomplish dynamic addressing in a function block given this limitation.
I am investigating indirect registers, but are not yet familiar enough to know if it will work.