LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to slow down my program using DRV ?

Solved!
Go to solution

@Yamaeda wrote:

Install G# from VIPM and you'll have an excellent usage of DVRs. 🙂


The only time I have found I needed to use a DVR was along the same lines: I needed a By-Reference object (multiple objects needed a reference to the same object).  Other than that one time, I have not used DVRs.


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 11 of 32
(750 Views)

@Ramprakash0111 wrote:

Hmm .. i am just looking for example ..a perfect one to demonstrate the usage if DVR.. i am even ready to develop the code myself , well , with the help of you people. Can u just give me synopsis or a situation where i will be forced to use the Data value reference. So that i can just go forward and do that code. Thank you in advnace .. Kudos !!


You will never be FORCED to use a DVR.  There are always other methods.   That being said,  there are times when I would choose to use a DVR.  As Y posted, G# uses them to enforce pass by reference for other developers that use G#.  There are good arguments for using a pass by reference approach.    Crossrulz points out that many experienced LabVIEW developers have learned that "Large Data" needs some care in handling... Google "Handling large data in LabVIEW " there are some very good knowledge base articles. 

 

 


"Should be" isn't "Is" -Jay
Message 12 of 32
(733 Views)

The QControl Toolkit also uses DVR's to implement by-reference objects.

0 Kudos
Message 13 of 32
(713 Views)

Can we stop the DVR discussion and go back to the original problem, which was already perfectly answered by Tim. The slowdown is 100% cause by excessive data in the xy graph, overloading the UI thread and thus stalling all front panel interactions. Nothing on the diagram side can cure that, not even a DVR!

 

Stop the insanity to graph massive amounts of data on a graph with an area of 1/4 postcard. You only have ~250 pixels in each dimension!

What is the data? Is it really arbitrarily spaced in time or are the time points equally spaced? How many points are there? How big are the files? You are duplicating a lot of identical x data. Maybe you can bring all to a common equally spaced axis by resampling, then use a plain waveform graph with custom x0,dx.

 

 

Message 14 of 32
(699 Views)

It would be nice if graphs handled this under the hood, but alas they don't (maybe a Qcontrol ;))

 

You basically want to send less data to the graphs so they don't have to hold as much information. Only you can make the call as to what that means specifically. Here are some ways to do it- you basically need to take a block of n points (where n is your reduction factor, for example use blocks of 10 points to reduce your data by 1/10th) and then:

 

-Use only the first element of the block (useful for viewing trends over time, very simple algorithmically)

-Average the data and use that (more accurate than the first, but takes a little more time)

-Calculate the max and min values for each block, and send both of those points (useful if you need to see every peak and valley in the data)

 

Those are just some options. You can keep all of the data stored in a shift register, then when the user zooms in on a section, repeat the decimation algorithm on only the displayed subset, but with an appropriately smaller decimation factor- this way the user can still zoom in on the plot and see everything that way, but not all of it is displayed at once, which is causing the slowdown.

Message 15 of 32
(694 Views)

@altenbach wrote:

Can we stop the DVR discussion and go back to the original problem, which was already perfectly answered by Tim. The slowdown is 100% cause by excessive data in the xy graph, overloading the UI thread and thus stalling all front panel interactions. Nothing on the diagram side can cure that, not even a DVR!

 

Stop the insanity to graph massive amounts of data on a graph with an area of 1/4 postcard. You only have ~250 pixels in each dimension!

What is the data? Is it really arbitrarily spaced in time or are the time points equally spaced? How many points are there? How big are the files? You are duplicating a lot of identical x data. Maybe you can bring all to a common equally spaced axis by resampling, then use a plain waveform graph with custom x0,dx.

 

 


Why,...and I am still hopeful that the performance and memory manager results will be shown....

If ANYONE can beat the memory manager improvements for the OPs vi outside of my submission...Well, that would be you! Always willing to learn!


"Should be" isn't "Is" -Jay
0 Kudos
Message 16 of 32
(679 Views)

They are hammering the UI thread. I don't think we can learn more. We don't really need to ask if the glass is half full or half empty if it is located at the bottom of the ocean. 😄

0 Kudos
Message 17 of 32
(674 Views)

@altenbach wrote:

They are hammering the UI thread. I don't think we can learn more. We don't really need to ask if the glass is half full or half empty if it is located at the bottom of the ocean. 😄


I am still unhappy about using two For Loops...

There has got to be a better way...

.I'm just missing it,


"Should be" isn't "Is" -Jay
0 Kudos
Message 18 of 32
(669 Views)

Yes, the code obviously stinks, but I'll wait until we know more about the data structures (see my post #14) before deciding on a better solution. 🙂

Message 19 of 32
(653 Views)

The x axis data is not same .. I am actually logging the random number data 96000(samples- dbl)*9(channels) as a tdms file. I have 20 such files. i want to plot it in a graph ( or an xy ) by appending all the 20 day data. With each channel being individual plots. Finally , i must be able to view 96000*20 data points with 9 different plots plotted with respected to the stored time.

 

The actual reason i am trying to do this is- to know whether DVR can solve this problm.

 

Iam not concerned about this application, if someone says what is exactly DVR and show me an exact working condition like where , in which situation the DVRs will be used- i will be done.

 

And sorry for messing it up with a very large data.

 

Thank you so much for all your replies !!!

0 Kudos
Message 20 of 32
(642 Views)