LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using controls to change range of multiple graphs

Hello...

I have two questions:

I have a VI with ten graphs created from a ASCII file loaded by read spreadsheet function. The first graphs shows the points 1 until 200 of X axis, the second graph the points 201 until 400 of X axis, the third graphs the points 401 until 600 of X axis........ until the end of points....

All these graphs present the same range in the Y axis


First question: is there a way to change the size of the invertals of X axis (that is 200 points in the example above), using a control? Because are many graphs, and changing the ranges one by one will be not fast...

Second question: is there a way to change the range of Y axis in all the graphs in one operation, using a control?

Thanks

Daniel
0 Kudos
Message 1 of 14
(3,809 Views)
You can change the range of any axis programmatically via a property node. If you have multiple graphs, create an array of references and then use a FOR loop to autoindex over all graphs. (attached is a very simple example, modify as needed).
 
You can do a similar thing with the x-ranges, e.g. use [i] if the FOR loop to calculate each range.
 
I don't quite understand why you need 10 graphs. Can you show us your VI?
0 Kudos
Message 2 of 14
(3,801 Views)
... and here's an example for X and Y axis.
0 Kudos
Message 3 of 14
(3,798 Views)
Altenbach... thanks again for the attention...

I was not able to open the files... my Labview is older than yours....

I use 10 graphs because I need to perform a visual inspect of the segments of the whole series. Next, I can remove some segments that present artefacts and these segments will not affect the average of the whole series.

Thanks

Daniel
0 Kudos
Message 4 of 14
(3,790 Views)


daniel.penteado wrote:
I was not able to open the files... my Labview is older than yours....

What is your version?


daniel.penteado wrote:
I use 10 graphs because I need to perform a visual inspect of the segments of the whole series. Next, I can remove some segments that present artefacts and these segments will not affect the average of the whole series.

Still, I doubt you need 10 different graphs. You could use a single graph, show the scroll bar, and let the user define the rangeboundary to be removed using cursors for example. You could also use a single graph and a suitable control to pick which range to show at any given point in time.
 
Anyway, here's one possible code to set the x-range. Notice that the edge elements overlap. If you don't want that, you can change the math slighly (e.g. add a -1 for the max value).
 


Message Edited by altenbach on 04-20-2008 10:40 AM
0 Kudos
Message 5 of 14
(3,765 Views)
Altenbach... I really need the ten graphs because is more easy to inspect for artefacts..... because I perform FFT analysis in my data and these artefacts may bad affect the final result.....

I was looking at the examples of Labview and I think that my problem is solved. I am sending a VI attached with the control for the ranges, as I want. But I still have a problem... I want to change this VI to create my graph from a ASCII file loaded by spreadsheet read function...but I am not able to do this... When I wire the read spreadsheet to the "waveform data"  terminal in the Plot Waveform VI, I got an error and I try to manage this error inserting arrays and build arrays between the read spreadsheet function and the Plot  Waveform, but I was unsuccessful.... If I connect properly the read spreadsheet to the Plot Waveform my problem is solved....

Your idea in the image posted is very good, and is a good alternative to plot large series.... but in this particular case I need the multiple graphs...

Thanks for attention...

Daniel


Message Edited by daniel.penteado on 04-20-2008 02:14 PM
0 Kudos
Message 6 of 14
(3,753 Views)


daniel.penteado wrote:


Your idea in the image posted is very good, and is a good alternative to plot large series.... but in this particular case I need the multiple graphs...


Altenbach's posted code does handle multiple graphs.  It has 4 Waveform graphs numbered 1 through 4.  It uses control references and property nodes to iterate over the 4 graphs in a loop.
0 Kudos
Message 7 of 14
(3,694 Views)

I was looking at the examples of Labview and I think that my problem is solved. I am sending a VI attached with the control for the ranges, as I want. But I still have a problem... I want to change this VI to create my graph from a ASCII file loaded by spreadsheet read function...but I am not able to do this... When I wire the read spreadsheet to the "waveform data"  terminal in the Plot Waveform VI, I got an error and I try to manage this error inserting arrays and build arrays between the read spreadsheet function and the Plot  Waveform, but I was unsuccessful.... If I connect properly the read spreadsheet to the Plot Waveform my problem is solved....

Thanks for attention...

Daniel
0 Kudos
Message 8 of 14
(3,668 Views)
Not sure what you are saying. 'If I connect properly the read spreadsheet to the Plot Waveform my problem is solved...'
 
Does this mean you have found out how to connect it properly and need no further help or are you still struggling to read the file and plot it? Your posted VI does not do any file read so I'm not sure why you would post that. If you are having problems, you should post the code that does not work. Also post an example of the text file.
 
And why are you using the picture control instead of the normal graph?
 


Message Edited by Dennis Knutson on 04-23-2008 08:32 PM

Message Edited by Dennis Knutson on 04-23-2008 08:32 PM
Message 9 of 14
(3,665 Views)
Hello...

My main problem is: I have a large ASCII file and I will create multiple graphs to view segments of this file.

Graph 1: 1 to 100 (seconds) in X scale

Graph 2: 101 to 200 (seconds) in X scale

Graph 3: 201 to 300 (seconds) in X scale

and until the end of the ascii file......

I want to create a control to change the interval of each graph. In my example the inverval has 100 points (from 1 until 100, from 101 until 200), but in some situations I need to change this interval to 250 points for example. In this new situation my graph 1 will go from 1 until 250, my graph 2 will go from 251 until 500.....

But change one by one the graphs will take a long time, I need a control to change wall the graphs with one command, but I don't know how to build.

Thanks

Daniel
0 Kudos
Message 10 of 14
(3,657 Views)