Hello Pramod,
Are you using a graph or a chart to display your data when acquiring with the DAQ assistant? Also, are you using finite or continuous acquisition?
If you are using a graph to display your information, this behavior is to be expected. The graph displays whatever data is given to it at any point in time. So when you acquire at 5000 samples at 20KHz, it will display these individual chunks as they are read from the 6040E.
You have two options to get around this. The first is to use a chart instead of a graph, and the second is to concatenate your data and use shift registers so that you retain previous chunks of data. I have included an example VI which displays information in a traditional graph, a chart, and also a modified graph for comparison. 
I hope this helps and let me know if I can clarify anything else. 
Regards,
					
				
			
			
				
	Chris Behnke
Sr. RF Engineer
High Frequency Measurements