_

hello everyone ,
when the program run this global function with for loop ,the outdata and indx data begin and end data both went wrong ,why? when i cancel for loop code ,it is right.