sorry, my mistake. You are right - both arrays have 11 items.
But still the size need to comply with parameter n. Once you change it to 11 it should do the trick.
Hi Richard,
there are various "simplifications", using various offsets to distinguish between the four tables of data. For Holding registers, the most typical is offset of 40000, but as you already noticed, this is no standard.