LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Save continuously without loosing data

hello,

My Continuous DAQ specs are:

Sampling rate = 10MHz

Samples = 5MHz/s

Labview = 2018 32-bit

PC = DELL Optiplex 9020

 while capturing the continuous samples, after few seconds the data gets loss. i increased the input buffer size to 512MB but it didn't work. 

can anyone help in this regard?

0 Kudos
Message 1 of 13
(1,356 Views)

@sundas wrote:

hello,

My Continuous DAQ specs are:

Sampling rate = 10MHz

Samples = 5MHz/s

Labview = 2018 32-bit

PC = DELL Optiplex 9020

 while capturing the continuous samples, after few seconds the data gets loss. i increased the input buffer size to 512MB but it didn't work. 

can anyone help in this regard?


First of all, you should create your own thread instead of piggybacking off of a 15 year old thread that's not really relevant anymore.

 

Next, you need to provide a LOT more information, preferably a copy of your code so that we can see what you're doing, ask relevant questions that may arise, and then advise.

0 Kudos
Message 2 of 13
(1,349 Views)

Use the logging features in DAQmx, don’t try to roll your own. Secondly, make sure the number of samples you are acquiring per some time period is an even multiple of the disk sector size.

0 Kudos
Message 3 of 13
(1,343 Views)

You are sampling at 10 MHz, i.e. 10 M samples/sec.  You say "Samples = 5 MHz/s", or Samples = 5 M samples/s/s = 5 M samples/s², which doesn't make sense.

 

How fast can you write data to disk?  You should expect to get at least 100 MB/s, so if you are taking 1 channel of a 16 bit A/D, say, that would be 2 B at 10 M samples/s = 20 MB/s.  On the other hand, if you are writing 32 samples of Dbls, that would be 128 MB/s, getting up there.  Know your Hardware, know your Data (saving) requirements.

 

Bob Schor

0 Kudos
Message 4 of 13
(1,287 Views)

As johntrich mentioned, we could use a few more details.

In addition to the code you're using, could you tell us what you're acquiring the data from/with (I don't mean the PC, but rather the DAQ device)?

 

Are you using DAQmx or is this from some other type of system (e.g. serial, TCP, whatever). The code will make this clear too 🙂


GCentral
0 Kudos
Message 5 of 13
(1,270 Views)

i have shifted to Labview 2018-64 bit but the problem is still there.

How can i create my own thread? (Are you talking about thread assignment from timed loop? )

 

0 Kudos
Message 6 of 13
(1,202 Views)

Hello,

I have a ADLINK Data Acquisition Card. My specs are:

Sampling Rate             =    10MS/s

Samples/Frame Size   =     3M

I am using a Producer/Consumer approach to continuously capture and process the input data.

Below are some issues that i am facing:

1. Few samples miss randomly 

2. My processing time is 1sec approx.  i have to capture each frame after this processing time.

3. i cannot afford any sample loss

 

Attach is the screenshot of the approach i am using.

Please help anyone.

0 Kudos
Message 7 of 13
(1,183 Views)

Hi sundas,

 


@sundas wrote:

How can i create my own thread? (Are you talking about thread assignment from timed loop? )


Again you failed in creating your own thread (aka "topic") by using the "Start a topic" button at the top of the LabVIEW board…

Stop hijacking (very) old threads to add your own messages!

Why did you even start a discussion in a different thread when you can continue in your own thread? (Which btw. was created by moving your message and its replies into their own thread by me.)

 


@sundas wrote:

Below are some issues that i am facing:

1. Few samples miss randomly

2. My processing time is 1sec approx. i have to capture each frame after this processing time.

3. i cannot afford any sample loss


  1. How many samples are missing? How many samples do you read per producer loop iteration?
  2. This is not a question: what kind of answer do you expect here?
  3. Check the subVI used to read those samples…

 

  • What's the point of using 2 ExpressVIs (ToDDT, FromDDT) to convert a 2D array of booleans into a scalar boolean?
  • What's the point of comparing a 2D array with an empty array constant?
  • What's the point of enqueuing the very same data into two queues, but label one as "current frame" and the other as "previous frame"?
  • How is processing time of consumer loop related to iteration time of producer loop? Is there any significance in stating a processing time of ~1s?
  • Why don't you kill the "previous frame" queue on VI exit?
  • Why is there a wait time in the producer loop when your DAQ routine should define the iteration time?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 13
(1,161 Views)

1. the conversions that you are asking about is just for the reference. In actual code there is some other conditions which decides either the current sample is to Enqueue or not?

2. The number of missing samples are random

3. In "Enqueue previous Frame" i have to save previous sample. Basically, in my application i have to store current Sample (only if the condition meets) but have to store every previous sample for later use.

4. the wait function is to create a delay in Producer loop so that no data miss but unfortunately it didnot work.    

0 Kudos
Message 9 of 13
(1,154 Views)

Hi sundas,

 


@sundas wrote:

4. the wait function is to create a delay in Producer loop so that no data miss but unfortunately it didnot work.    


How should that wait function in the producer loop help to avoid missing samples when that subVI in the upper left corner is responsible to provide those samples?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 13
(1,152 Views)