Going back to rocket's original question....
No, you cannot re-size array tags dynamically with code.
You cannot even re-size array tags online.
The problem here is that array tags allocate their data into contiguous memory space. This allows them (amongst other things), to be the sources and targets for communications with other PLCs, and useful where you want to "index", or indirectly address, elements within the array.
I cannot see the point in wanting an array to be smaller on the days when there are few data to collect, and larger on the days when there are a large number of data to collect. You will certainly need the memory space for the large array, so allocate it anyway, to hold the maximum data you envisage.
Nothing else in your application will need dynamic memory allocation, so trying to recover "unused" array space doesn't give you anything.
One useful thing about not being able to change the size of array tags, is that the programming software can "estimate" memory usage when downloaded to the target processor.
No, you cannot re-size array tags dynamically with code.
You cannot even re-size array tags online.
The problem here is that array tags allocate their data into contiguous memory space. This allows them (amongst other things), to be the sources and targets for communications with other PLCs, and useful where you want to "index", or indirectly address, elements within the array.
I cannot see the point in wanting an array to be smaller on the days when there are few data to collect, and larger on the days when there are a large number of data to collect. You will certainly need the memory space for the large array, so allocate it anyway, to hold the maximum data you envisage.
Nothing else in your application will need dynamic memory allocation, so trying to recover "unused" array space doesn't give you anything.
One useful thing about not being able to change the size of array tags, is that the programming software can "estimate" memory usage when downloaded to the target processor.