Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

why 99% cpu load when running buffered position measurement

I'm getting 99% cpu load while performing a buffered position measurement with a 6602 in a PXI system.
I am running the example provided with Labview itself.
What am i doing wrong here ?
0 Kudos
Message 1 of 2
(3,136 Views)
This is a known problem. The reason for this is that the counter buffered operation uses a blocking method, so that buffer object spins in the kernal while waiting for the buffer to fill.

A workaround is to continually check the backlog and then just read exactly what is in the backlog. You can read the backlog by using a shift register within the while loop. Connect the backlog output of the Counter Read Buffer VI to the shift register on the right side of the while loop. Then use the shift register on the left side of the loop for the number to read input of the Counter Read Buffer VI. This will assure that you are only reading what is in the buffer and you are not tying up the CPU waiting for the buffer to fill. I hope this helps.

Regards,

Todd D.
App
lications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,136 Views)