01-27-2021 08:54 AM - edited 01-27-2021 09:16 AM
@photonick wrote:
Dear JpB!,
Can you please help in controlling the measurement speed? I need atleast 10k-20K measuerements per sec. How it can be possible. Any idea?
First you failed to post snippets of what you have. So, I'm left to debug the general case. I always enjoy impressing the Forums with my 8-Ball so here we go the common errors are:
01-27-2021 09:22 AM
Sorry I forgot at that time and when I checked your last post I got fast speed so forgot to post. Anyways this was the problem I was always getting when changing the something in the commands and I that time I really did not know that what is the matter with power command.
01-27-2021 09:40 AM - edited 01-27-2021 10:28 AM
Dear JpB,
RTFM😋 , my mistake man !. Thank you so much you did excellent job. By the time (<200ms), do you mean the TIMEOUT that is set at 1000ms to the loop (advance sorry if this is a very basic question)? , also why you made buffer size equal to zero ?
Your explanation helped me alot !!!!!!
01-27-2021 04:08 PM - edited 01-27-2021 04:38 PM
@photonick wrote:
Dear JpB,
RTFM😋 , my mistake man !. Thank you so much you did excellent job. By the time (<200ms), do you mean the TIMEOUT that is set at 1000ms to the loop (advance sorry if this is a very basic question)? , also why you made buffer size equal to zero ?
Your explanation helped me alot !!!!!!
Acquisition speed is going to be sample rate in samples per second divided by averages divided by samples per acquisition. That, of course, gives us Acquisitions/Sec! It's good practice to spin the Acquisition loop faster than 200msec so, when the user presses the STOP button, they aren't waiting forever for the Acquisition loop to finish. It's a UX thing and has nothing to do with the device Timeout. Timeout only occurs when the requested number of samples is not available (could be a missing trigger or an unusually slow sample rate)
Running the numbers for samples per second @50k with no averaging and 200msec loop rate means we would want 10k points in the device buffer. I bet that buffer is not that big! In fact it is probably between 1024 and 4096. I didn't Memorize The Friendly Manual (MTFM) so you have to Read The Friendly Manual (RTFM)
So, either we set AVERAGING = 10 samples per point or run the loop 10 times faster than 200msec and read 1k points to avoid buffer overflow. You stated you wanted 50ks/s.. 20msec loop rate seams the way to go.
200msec is about as slow as Users can tolerate clicking on the mouse without a response (much longer and they start bashing the mouse on their desktop)
Updates to the Front Panel indicators faster than 50hz, 20msec, can't be seen by the human eye. So, that's the "Sweet Spot" 5-50hz for an Acquisition loop.
02-16-2021 11:49 AM
Thank you so much JpB!!!!
Your help really worked. I am able to control the device acquisition rate. I am applying external trigger like 1k to 10k or more, but I how can I be sure that I am getting the exact number of samples per second?
This time I have read the RTFM!!! but I am not sure what rate I am actually getting as I know I am applying 10kHz Ext trigger source so the same samples shoud be there at the output. Is there any check to verify?
2) Also what if I do not use any delay time inside the while loop? at what rate loop will execute , any chances of overwriting the sample then?
I am using mesurement speed DOUBLE , As this time it is externally controlled so no 50k samples. Thanks!!!