 大D
		
			大D
		
		
		
		
		
		
		
		
	
			11-25-2018 09:21 PM
I can use my program to acquire sound pressure data continuously.
But when collecting data for a long time, I don't need to do it because my disk space won't be enough.
I want to run acquire data for 1 min then wait time 1 min,so I add time delay Express VI in it,and found the memory full error happen after few hours.
I found maybe the problem is the Obtain queue ,the buffer size can't store too much data, then I add the loop include the system. But It still did't work well.
Does anyone can tell me what I need to do to fix it?
Here is my program.
Solved! Go to Solution.
 James.M
		
			James.M
		
		
		
		
		
		
		
		
	
			
			
    
	
		
		
		11-25-2018
	
		
		09:31 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 - last edited on 
    
	
		
		
		05-06-2025
	
		
		02:24 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 by 
				
		 Content Cleaner
		
			Content Cleaner
		
		
		
		
		
		
		
		
	
			
		
Please include a Snippet of your code. I can't view the VI, but this sounds like an easy fix by looking at the code.
Cheers
--------,       Unofficial Forum Rules and Guidelines                                           ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
 RavensFan
		
			RavensFan
		
		
		 
		
		
		
		
		
	
			11-25-2018 10:19 PM
Why would you put a Time Delay in your file writing loop? Of course that is going to slow down that loop. Your queue is probably growing.
If you don't want to collect data for a minute, you probably want to use the Elapsed Time Express VI to know when a minute has passed, and use a case structure to determine whether that data should be written to a file or discarded.
11-26-2018 03:39 AM
I hope this what you want,I have never use Snippet before.
 crossrulz
		
			crossrulz
		
		
		 
		
		
		
		
		
	
			11-26-2018 05:42 AM
1. Why do you have a loop inside of a loop for your consumer? That makes 0 sense.
2. Add a condition to whether or not to send data to the consumer loop. Use the Elapsed Time express VI and have it reset every 1 minute. When it does reset, toggle whether or not you enqueue the data. Hold the flag in a shift register.
 Yamaeda
		
			Yamaeda
		
		
		
		
		
		
		
		
	
			11-26-2018 08:02 AM
The problem is simply that you still sample during your "waiting period" and you fill up the buffers.
During the wait, you should still sample as you do, just not send it to the queue for Writing. It might seem a Little inefficient, but the logic is "let the program run as similar all the time as possible".
/Y
11-26-2018 10:44 AM
hello crossrulz
1.The inside loop is a test motion that I forgot to delete.
2. You mean I need to use the Elapsed Time express VI in producer loop,right?
I also add blank time to wait. I made this configuration below.
It does work,but I am not sure it would happen any errors or not after long time acquiring.
 altenbach
		
			altenbach
		
		
		 
		
		
		
		
		
	
			11-26-2018 11:24 AM
@大D wrote:
It does work,but I am not sure it would happen any errors or not after long time acquiring.
Your code is still highly flawed, but since I don't have DAQmx installed, I cannot look at your IO configurations.