Thanks! The program now records the entire time series. However, there is a couple of issues. The joyres.txt file that allows you to specify the sampling rate (say, every 100 ms) seems to work only for the Y-axis information. The X-axis information is still recorded every 10 ms. Should I include two numbers in the joyres.txt file to specify both X and Y axis sampling rates? Also, another small issue is that the variable headers stop being written to file after 32700/32760, so the remaining data have no variable headers.
I am however glad that the main issue has been sorted out - thanks!