LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display Data on waveform chart or XY graph over a long period of time

Display Data on waveform chart or XY graph over a long period of time

Can anyone help?

I am acquiring data from an Ni DAQ card with the following parameters - sample rate = 12800, number of samples = 4096. I want to extract order information so as to track changes in the amplitudes of certain frequency harmonics. So I use the sound and vibration toolkit to extract this information as shown in the attached Vi.  I will like to plot the resulting amplitudes against real-time starting at the time the Vi was run.  I really want the display to show these changes over long periods (eg. days, months and even years).

Problem.

I have tried to plot the Y component of the resulting magnitude for a given order on a waveform chart. My choice of the waveform chart is because I also want to display  alarm limits (using the mask and limit vi) (I can't have these lines displayed on an XY graph plot).  I tried adjusting the scale offset using the property node and setting the offset to current time. However, the display on the X-axis can only show a span of  2 minutes as will be seen when you run the attached vi. I want the time display on the x-axis to be over a period of  days, months  and even years.  Is there a way to set the maximum scale on the x-axis to be say a year or so in future.

 

I really want the display to be like the one in in the second attachment.

 

Attached is a sample VI created using an Ni USB 9234 DAQ card. Any card will do but I am only getting the signal from one channel for this example

I will appreciate any help that can be given to me.

Thanks

Download All
0 Kudos
Message 1 of 6
(9,113 Views)

Long term testing can be tricky- and we'l get into that later.  Lets start with the basics that you have wrong.

 

The vi as you have constructed it has only one memory element, the chart history length (default is 1024.)

You can change the number of points the Chart will remember by Right-clicking the chart an select Chart History Length from the menu.

17607iB5158B4E7BE604B3

 

But for a long term test - and one where you want to REMEMBER the first value you need a memeory element that is independant of the application.  Your PC WILL loose power or need to be rebooted eventually.  Heck it might even need to be replaced! you really need to store your data in a file. Preferablly in a file that is backed-up on a regular basis so you don't lose every point of data if the PC dies.  It realy hurts when you have to restart a 2yr test because you've lost the 18months of data you collected. Smiley Sad

 

For an application like this I would seperate my "collection" and "Evaluation" operations. 

 

Have one vi that takes the reading and writes it to a file at a configurable rate  You may want 1reading  per minute for seveal days then 1 per hour for a few weeks- then maybe only once or twice a week for the next couple of years since you are looking for LONG TERM stability.  having too much data to evaluate can take a lot of digging to find the few things that interest you (but always take more that you think you need)

 

Have another utility that COPIES the files, reads them and displays the data you are interested in that day.  The data you want to look at won't change over time HOWEVER, you WILL want to analize it in different ways depending on what the data trends look like.  Having seperate routines for collection and display allows you to update the display style and analisys without even stopping the collection vi (much less editing the vi)


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 6
(9,099 Views)

Hi Jeff,

 

Thanks for the information. That really helps. I have followed your advice and the time display issue is resolved.

Thanks once more.

Cyprian

 

Message 3 of 6
(9,090 Views)

Glad to be of help!

 

Not everyone needs to make every mistake- the learning is less painful when you can avoid common pitfalls. Smiley Very Happy


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 6
(9,082 Views)

Hi all,

 

Is there a way to draw alarm (limit test lines) on an XY graph to look like the one in the attached file? I know you can do this on a waveform chart by passing the resulting array from the mask and limit test vi to the chart but when each numerical value of the array is bundled with a timestamp from the current time vi, no alarm line is drawn on the xy graph. Can anyone help?

I will really appreciate any help?

Thanks

Cyprian

0 Kudos
Message 5 of 6
(9,072 Views)

The mask and limit data are typically drawn on a graph, not a chart and drawing alarm lines on an XY Graph can be done with cursors or the same way you are writing your current data. They are just additional plots. So you would create the new plot by bundling a constant and the timestamp.

 

It's really, really hard to debug an image and even harder when you do something like pasting that image into a proprietary file. If you are having problems creating the additional plots, at the very least, take an image of the block diagram. Better is to post the actual VI.

Message 6 of 6
(9,063 Views)