From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How usage of DVR can improve the performance

I've following use case (project files are attached - version 2013).

Continuous DAQ

 

LV2G

 

Now I would like to know:

a. Is there a way I can use DVR to optimize the performance (individually or both - speed and memory).

b. What if 'Continuous DAQ' has a modification; instead of reading '100' samples, '-1' (all available samples) is wired to 'DAQmx Read'? (the change I want to highlight is, 2D array size will vary with every iteration).

c. Was looking for any online resource to understand more about DVRs with some good use cases example.

 

Thank you everyone.

0 Kudos
Message 1 of 2
(2,858 Views)

To keep the exact functionality you have here and increase performance, you actually want to use a Global Variable.  GVs are a lot more efficient than FGV.  Shamelss plug: A Look At Race Conditions

 

But the real question here is "What are you doing with the data?"  I see nowhere that the data is being read.  Do you need to process every sample?  Or do you only care about the latest values?

 

A DVR, GV, and FGV are all lossy: you can miss writes.  They only return the latest value.  This is a form of a race condition.

 

Personally, I would use a Queue or User Event to send the data to whoever needs it.  This way all of the data is processed, it is done quickly, and efficiently.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 2
(2,826 Views)