LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

100% CPU usage

Thanks, That's a good idea to do the average over a minute but the example DFGray posted in his link it's quite interesting too, I'm interested in the example GLV_GigaLabVIEWGenerateAndDisplay.vi that I attach here, but I don't understand very well it... I want to modify it, and apply it for each point I acquire and then plot it. How can I do it for each point I acquire? Or is it not possible to apply it  for each point individually? I must have an array of items to apply it? Can anyone helps me please?

Thanks,

ToNi.
0 Kudos
Message 11 of 21
(2,255 Views)
Hi again,
 
How can I apply data decimation method to my example I attach here? I don't understand very well data decimation method, sorry. Can anyone helps me to apply it to my example? I want to plot 1440 points in it (see history length for my chart) that's because I use autoscale X-axis. You are right, the screen doesn't have enough pixels to represent it, that's because I'm interested in apply data decimation method to my example. And another question... maybe I would have to open another thread to ask it, sorry but I want to plot from left to right. Initially when LV plot my first data point to waveform chart it plots the data point on the right and I want it begins to plot from left to the right each time I plot a data point to it.
 
Thanks,
 
ToNi.
0 Kudos
Message 12 of 21
(2,139 Views)
Hi again!
 
Well, I think I have solved the problem to plot from left to right. I attach here the new VI but now.... I would like to apply to this example the data decimation method because when I put 1440 points (each minute one point) on X-axis you can't see very well each point in the chart, they are very near each other. Initially I set the minimum and maximum values for scale of X-Axis. I set minimun to the current time and maximum to the last point on X-axis (current time + 86400 (24 hours=1 day)). As I plot data each minut (average during a minute), I have set history length to 1440 because in the chart I plot points each minute. How can I apply data decimation method to my example I attach here?
 
Thanks,
 
ToNi.
0 Kudos
Message 13 of 21
(2,131 Views)
If you want to use decimation, you will not be able to use the waveform chart.  You will need to use the waveform graph and keep track of the data yourself (you can use the buffer in the GigaLabVIEW.llb for this).  This is because the amount and results of decimation depend upon two things - the pixel width of your graph and the number of data points you have.  If you use a waveform chart, you can't easily go back and change all the data in it.  A waveform graph, however, must be totally rewritten every time, making it perfect for your application.  GLV_GigaLabVIEWMemoryStoreAndBrowse.vi in the large data tutorial is pretty close to what you want.  Try the following.
  1. Use GLV_WaveformBuffer.vi to store your data.  It conveniently includes a frame buffer, which you may also wish to use.  You can either resize the data array every time you add a point, or, much better, simply double the size of the data every time you run out of allocated space.  Add your data points using the Write to Full method.
  2. To display, read the number of data points you actually have, decimate them, convert to waveform format and plot the result on the waveform graph.  Remember to set the waveform graph to actually use the timestamp (right click on the graph and make sure Ignore Time Stamp is not checked).
As I mentioned, most of this code is shown in GLV_GigaLabVIEWMemoryStoreAndBrowse.vi.  If you are not resizing the data array, it should take substantially less than a second to add a point, read the full set of data, decimate it and plot it, assuming 100,000 data points and a reasonably modern computer.  Since you are taking data every minute, you should have lots of free CPU time.

You will need to manually set the scale on the X-axis of the graph just like you did the chart.  Let me know if you run into problems and I will try to help.
0 Kudos
Message 14 of 21
(2,118 Views)
Hi,

Can I decimate point by point or Must I have to decimate only a vector?  Is it possible to decimate only a point and then plot it? I would like to decimate point by point and plot point by point and not a whole vector of doubles at once.

Thanks,

ToNi.
0 Kudos
Message 15 of 21
(2,103 Views)
Hi again,

I would like to do something like I attach here. I would like to plot point by point. I want to decimate point by point and plot it each 5 seconds (5000ms). My waveform graph has 17280 points and you can see the results for a day (24hours). Then I would like to do a scroll update mode like  in chart waveform.

The example I attach here doesn't work. I don't know how to cope it to work as I want. Sorry, Can you help me please?

ToNi.
0 Kudos
Message 16 of 21
(2,098 Views)
Hello,
 
I think the Data can be handled by a graph.. I modified something and I hope it works. By the way, what kind of LabVIEW-Beginner should undestand taht Gigabyte-LV-Demo??
 
Ciao TPoint
0 Kudos
Message 17 of 21
(2,078 Views)
Hi,
 
Can you attach it in version 7.0 please?
 
Thanks,
 
ToNi.
0 Kudos
Message 18 of 21
(2,068 Views)
Hi,
 
Well, I attach here a little example. I represent data from 1 day each second for this reason I have 3600 points. I apply data decimation to  each point I want to plot but I have problems with waveform graph, it doesn't keep old points, only the newest one I just add to it why? As you can see in block diagram I always link the current waveform to the input waveform of the build waveform block in order to keep the old points and plot the new one but it doesn't work...
 
Thanks,
 
ToNi.
0 Kudos
Message 19 of 21
(2,051 Views)

That is as expected for a graph.

A graph and a chart work differently. A graph will clear the previous data and display the new stuff every time it is updated.

A chart will append the new data to whatever is already there.

Replace your graph with a chart and you will be closer to what you are after.

The "dt" of the waveform data type could cause you some problems onder the wrong circumstances. If you present more than one data point in the array the chart will plot the second and following points relative to the time stamp of the waveform. If there is an over-lap between the time plotted in an update and the time span already present in the chart, the chart will clear itself. So watch your dt or make sure you only pass one data point in each waveform.

You also may want to try defering panel updates as suggested earlier by TPoint.

 

Have fun,

Ben

Message Edited by Ben on 11-04-2005 05:13 PM

Message Edited by Ben on 11-04-2005 05:14 PM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 20 of 21
(2,043 Views)