LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple waveform chart, history of waveform charts

Hello all my dear colleagues.

 

I have problem with my acquisition's software. I create software for acquisition 40 signals. I have to display and save these signals. I measure these signals with different frequency (It depends on the user selection) but the lowest frequency is 500 Hz and the highest is 2000 Hz. Because I have to display different size of X scale (5 sec - 60 sec),  I decimate these signals for display and I display only 100 samples per second.

 

I think that my problem is connected with a very long history of waveform chart. When I display all signals in one chart, signals aren't displayed continuously and the run of chart is longer than the correct size of X-scale, it means that the run of waveform chart freezes. I think that the problem is connected only with display and no with acquisition because I tried to check measured data and there isn't any problem. 

 

Do you have any opinion how I can solve my problem?

 

Please, help me, because I don't have more ideas.

 

Thak you.

 

Here is my VI. 

0 Kudos
Message 1 of 10
(4,482 Views)

The first problem is that you are using am inappropriate type of display. A chart has a single X axis (time scale) but in your data you have three. To deal with that you have to decimate (read:throw away} data. The proper solution is to use a display that can deal with varying time scales: an x-y plot. By manipulating the data that goes to the graph you cam make it appear to be a scrolling chart, but isn't one really.

 

An x-y graph has several possible datatypes that it will accept. The one I like for this kind of work consists of an array of clusters, where each cluster element is one plot. The cluster itself consists of an array of x values and an array of y values. To make your data appear to scroll you do the following to add a point to a plot: 1) Rotate the two arrays so element 1 is now element 0, element 2 is now element 1 and so on. 2) Update the last element in the arrays with the x and y values for the new data point. 3) Pass the modified data to the graph.

 

A second, more fundamental problem is that you are wanting to display a scrolling display that updates 100 times a second. That is much too fast for anyone to read, let alone understand. What is it that you are trying to accomplish?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 10
(4,473 Views)

Ok. Thank you for your advise.

 

But I have one more question. When I'll use XY graph and your solution of my problem with a buffer for each canal, how can I hold a correct time? How can I do that the graph will be changed exactly in the correct time so in time that will be  respond to the real time? I can't drive this via the time of while loop because I have to let to run the while loop with frequency 2000 Hz due to the measuring of data. Do you think it is a solution to use new while loop only for changing the XY graph?

 

Thank you for your answer. 

0 Kudos
Message 3 of 10
(4,471 Views)
You know when you received the first data sample, that is t0 for the waveform. In addition you also know the sample rate for each waveform which means you also know how much time there is between samples.

For example, the reciprocal of 2000Hz is 0.5 msec so each data point is exactly 0.5 msec after the one before it. Because of this relationship you can easily calculate the real time of each sample.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 10
(4,448 Views)

Thank you very much for your advice.

I remodeled my program due to your advices and it works really good. My friend gave me advice that I could try to display each signal in a new graph. I tried it but the program freezes again so it means I'll use your way.

But now I have new challenge. Do you know how I can create special Y-scale for each signal? I know I can create a several Y-scales but I don't know how can I adjust size of these scales to I'd put these scales into graph above themselves thus into parallel display. I have 40 parallel signals and I need for each one a different Y-scale. I know one way to do it but it's really difficult because I'd have to create a special image with Y-scales and put it into graph as a bitmap. But it'll be firm in a graph and when a signal would be changed out of Y-scale this scale wouldn't be changed too. I don't know what to do with this problem.

 

Thank for your ideas. 

0 Kudos
Message 5 of 10
(4,435 Views)

Hi,

 

on this page you can find a tutorial about creating multiple scales for a graph or chart:

https://www.ni.com/docs/en-US/bundle/labview/page/adding-multiple-x-and-y-scales-on-graphs-or-charts...

 

This example shows how to modify scales and their properties at run-time:

https://forums.ni.com/t5/Example-Code/Change-Color-and-Y-Scale-for-a-Plot-on-a-Waveform-Chart-using/...

 

Best regards,

Daniel Fulop

Dániel Fülöp
Field Application Engineer (CLA, CTA)
National Instruments
0 Kudos
Message 6 of 10
(4,392 Views)
What do you mean by a "special" y-scale?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 7 of 10
(4,384 Views)

Hello.

 

I have about 40 signals and I need for each signal another Y-axis with another scale. It means that I want divided Y-scale to 40 different scales to I'd be able to have 40 parallel scales above them.

Do you know what I think? 

In this time I do it this that I do Y-scale like invisible and I put a image with 40 scales on the background of the XY graph. This scale isn't changeable, though.

 

To you have any ideas?

Thank you for your advices. 

0 Kudos
Message 8 of 10
(4,380 Views)
You can put multiple Y-scales on a graph, but 40?!?! Does you data really have that many different dynamic ranges?
I can't visualize what that many axes would look like.
Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 9 of 10
(4,372 Views)

I create special programm for measuring in medicine. This programm should measure 12 ECG signals, 18 bio-impedances signals and then about 8 or 9 signals as blood pressure and this. So it means that I really need to display a different scalle for each signal. I have one advantage that the size of graph will be still the same so I think that the way, which I use now, is the best for this problem. What do you think about it? I phoned my friend who is on the headquarter NI in Budapest and he told me that my problem is really special and anybody of his colleague has never solved similar kind of problem. He told me, you are really crazy.

 

 

0 Kudos
Message 10 of 10
(4,360 Views)