LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting 1-D array of dynamic data to dynamic data

I am collecting 5 channels of data at 80kHz continuously.  I collect blocks of 800 samples/channel using DAQ assistant then index the data on the loop.  I need to display this data as one long continuous "block" so i append each array to the next.  I believe there has to be a better way of doing this.  I have attached screen shot of block diagram.  Any help is greatly appreciated.

 

-Jake

0 Kudos
Message 1 of 5
(2,968 Views)

Hi Jake,

 

you could do the adding directly in the DAQ-whileloop, no need for an additional loop afterwards...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,948 Views)

I could use same loop but I want the acquisition to be as fast as possible.  I just need to know if there is a way to append my data that will use less memory because right now I am getting a memory full error.

 

-Jacob

0 Kudos
Message 3 of 5
(2,932 Views)

Hi Jacob,

 

you acquire 5 channels with 80kHz. Let's do some math:

5*80kHz = 400.000 samples per second.

400kS/s of DBLs = 400.000 kS/s * 8 Byte = 3.2MB per second

 

So you get 3.2MB of data each second. How long do you measure? In one minute you collect ~200MB of data, surely enough to force you into "Out of memory" messages...

 

You should think about:

- not using a While loop for measurement (as LabVIEW doesn't know the final array size before the loop starts)

- using queues

- using a proper Producer/Consumer structure

- not using the DAQ-Assistent for these data rates due to high overhead

- reading the knowledge base article on "Handling large datasets"

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(2,884 Views)

GerdW provided some excellent advice!

 

Dealing with large datasets in LabVIEW is definitely an art which requires good programming practices.

 

You may also find this KnowlegeBase article useful.

 

Why do I get "Memory is Full" Error in LabVIEW?

 

Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
0 Kudos
Message 5 of 5
(2,851 Views)