Jump to content
  • 0

Maximum buffer size on USB-CTR04?


wiwo-Andrew

Question

I'm crashing the PC when trying to allocate a too-large counter buffer on a USB-CTR04. I'm using onboard timing, 1 MHz, and asking for 15 million samples (15 seconds worth of counts, acquired in a "clear on read" mode. Windows 11, labview 2020, but I think I need to work with a smaller buffer size. It's not clear to me if the board's buffer is circular (writing new data back to start of buffer after reaching end)... which would make this simple, since I can query for new data at about 20 Hz.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hello,

I don't suggest making one huge buffer to hold 15 seconds or more of data. Instead, set the Samples to Read to 10% of your sample rate, [100,000 for 1M S/s] and instead of waiting for it to finish, read the buffer while the collection is happening. Attached is our event counter example set to read the input at 1M S/s. It uses an output for a signal source, so run a wire from TMR0 to counter 0 input. The read data loop will provide you with buffers (arrays) of data. You could choose to display, save it to a file, or maybe transfer to another array. 

Best regards,

John

 

ULx Count Digital Events-Buffered-Continuous-Int Clk.vi

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...