LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Slow measurement speed of power sensor U2041XA (Keysight)

Solved!
Go to solution
Solution
Accepted by topic author photonick

@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:

  • Configuration in the read loop. All initilazaion, configuration and closing must be outside of your Acquisition loop
  • Wrong triggering.  For highest measurement speed the triggering must be Continuous and the AVERAGING must be OFF. Samples per measurement should be < 200msec worth of samples assuming a reasonable onboard buffer (RTFM for that) 50k*200m = 10k. That seems large for a reasonable buffer. 1k samples should spin the acquisition loop at about 50hz 
  • Throttled Acquisition loop.  The device communication will  prevent the loop from being greedy! There should be no wait in the loop
  • Choaked Acquisition loop. There should be no other processing or file I/O in the loop Use a Queue or a Channel to pass the measurements to your processing loop.

"Should be" isn't "Is" -Jay
0 Kudos
Message 11 of 15
(584 Views)

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.

photonick_0-1611760920783.png

 

0 Kudos
Message 12 of 15
(580 Views)

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 !!!!!!

 

0 Kudos
Message 13 of 15
(569 Views)

@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.


"Should be" isn't "Is" -Jay
0 Kudos
Message 14 of 15
(541 Views)

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!!!

0 Kudos
Message 15 of 15
(486 Views)