08-28-2006 12:52 PM
08-28-2006 01:31 PM
Perhaps you are losing data during the time it takes to write to a file when you are saving the data. Maybe you collect all your data first, then save it to a file. Also, you while loop is hogging 100% of the CPU time. In order to avoid this, put a delay in your loop, even 1mS will allow the CPU time to do other things, and it won't seriously affect your outcome.
Here is one more piece of advice, and it pertains to all people who submit code for suggestions. Please take the time to clean up your wiring. Wires should not be hidden behind structure borders. Use left to right wiring when possible. Put some room between loop borders and case borders, especially so that wires can be displayed. Otherwise, we volunteers have to take extra time to determine the wiring. It is not obvious to someone looking at it for the first time as it is for the creator. Thanx for listening.
08-28-2006 01:36 PM
08-28-2006 01:55 PM
08-28-2006 02:20 PM
08-28-2006 02:43 PM
You have not told us how fast you are sampling.
We will need to know that to answer your question.
Ben
08-28-2006 02:53 PM
08-28-2006 03:20 PM
08-28-2006 03:32 PM
08-29-2006 08:01 AM
You are pushing the limits of PC's and PC hardware.
1) LV will have difficulty allocating a buffer that big. LV need contiguous memory for each of its buffers. As a quick experiment try writing a VI that just does an "initialize array" with a buffer that big. You can side step this issue by decreasing the duration of your test.
2) If you decrease the duration AND can allocate the buffer (init array) thengo with Tbob's suggestion of buffering the readings in a shift register that is
A) Initialized before the acq starts,
B) Use "replace array subset to move the readings in the the appropriate offset within the buffer.
C) Only attempt to save after the acq has completed.
3) If you REALLY need to collect for all of that time, then concider "divide and conquer" appraoches. Use two or three PC such that the first PC grabs the first batch, then the second PC takes over etc.
Ben