11-03-2011 02:39 AM
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.
11-03-2011 04:19 AM
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...
11-03-2011 04:56 AM
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.
11-05-2011 07:56 AM
11-06-2011 02:27 AM
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.
11-08-2011
06:42 AM
- last edited on
07-13-2025
09:26 PM
by
Content Cleaner
Hi,
on this page you can find a tutorial about creating multiple scales for a graph or chart:
This example shows how to modify scales and their properties at run-time:
Best regards,
Daniel Fulop
11-08-2011 08:16 AM
11-08-2011 08:33 AM
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.
11-08-2011 03:14 PM
11-09-2011 12:59 AM
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.