Sumi,
I created the attached test VI and have some observations:
(1) The value of "sample length" might cause the changing of the result.
(2) This VI need time to warm up. The results from the first "sample length" of iterations are useless. You can see big variation at the first "sample length" of iterations.
(3) After the first "sample length" of iterations, the result still can be changing in a smaller range. The changing is as expected when the "sample length" is not equal to the multiples of the signal cycle. This is caused by the spectral leakage. For example, if the frequency is 20Hz and the sampling rate is 1000Hz, there are 50 samples in each cycle. When you set the "sample length" as 50, 100, 150, ... you can get the exact 20Hz result. Otherwise, the result will vary around 20Hz. Increasing the "sample length" will reduce the varying range. For exmple, the changing is smaller when you set the "sample length" as 1024 in the attached VI.