Can I modify the sampling rate in the script?
Unfortunately, it is not possible to adjust the sampling rate within an automatic control script. You may modify the number of average samples, but this will not improve the sampling rate but only take extra samples and to calculate the average. The data you obtained will be the average of all the measured samples.