Hi,
I have created this VI for measuring an audio and detect when it starts and ends to obtain how long is the tone I have to measure. The tone has a frequency of 1000Hz and last between 3 and 5 s. I have different issues the at least I want to understand:
- If I use a 10000 S/s Sample Rate if I have the 5 s tone the buffer results to be too short and probably it is overwritten (I obtain the -1801 error).
- If I use 5000 S/s Sample Rate the VI works well but I see a shift in time of the tone (5000S.PNG) which moves towards higher values during the acquisition (see the comparison with the 10000S.PNG). I do not get why it happens.
- If I use Sample Rate between 5000 and 10000 (I have tried 5100, 5500, 6000 and 7000) I obtain the following warning (Warning.PNG). I noticed that the Sample Rate seen by the Hardware (Sample Clock:Rate Property of DAQmx Timing) in that moment has decimal place (for example if the sample rate is 5500 the property will show 5500,55). So how is it possible? And can be related to the dt warning? Is there any problem with the Sample rate selected? Since the Nyquist theorem is satisfied, I do not get why values over 5000 can cause the warning.
As a further details on how the VI is used conder that it is called by a TestStand Sequence in a Parallel thread.
I hope to have shared all the details to solve this problem since it is an important matter in our tests.
One last question: in case of long acquisition how is possible to use the DAQmx to acquire also for 10s keeping the values measured for post-processing?
Thank you for the help!
Best Regards,
Zuc