LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Taking few pieces of XY graph to compare

Solved!
Go to solution

Hello!

I want to cut some pieces of XY graph and show them on a new graph.

The problem is, how to cut piece that is between two cursors.

I try this way, but it is obviously wrong approach.

 

Any ideas?

 

Greetings,

Mariusz

0 Kudos
Message 1 of 9
(3,508 Views)

I dont have LV with me right now, but essentially XY graphs are (usually) arrays of X,Y cluster run the cluter through an array and rebuild all values withing the X and Y range you desire, this subset is the new set of values.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 9
(3,505 Views)

Here's a messy really quickly done example.

 

It consists of 2 x & 2 y cursors to create a box.

 

You read the values for each cursor to obtain your high / low values to search for. 

Then extract only those points.  Replot to another graph to illustrate..

You can simply display the qty 2 1-D arrays or build up a 2D array and display it.. 

0 Kudos
Message 3 of 9
(3,502 Views)

Thanks for such a quick answers.

Here's snippet of my code.

Your solutions will work if waveform was monotonic but what if it is, for example a sine wave?

How to cut precisely piece of graph that is between the two cursors?

0 Kudos
Message 4 of 9
(3,495 Views)

If you build your XY based on array of clusters instead on a cluster of arrays, your X,Y points will be correlated and you can do an in range based on the cluster max and min, very clean and doesnt need any assumptions of monotonic nature of data

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 5 of 9
(3,473 Views)
Solution
Accepted by topic author MuhAli11

See quick example.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 6 of 9
(3,470 Views)

Your basic understanding of an XY Graph is flawed. The X axis is only capable of ever increasing X values and your x array is not continuous. If you wired the 'i' output of the for loop and used that as the x axis array, everything would work just fine.

 

p.s. Get rid of the value properties and the Insert Into Array function.

0 Kudos
Message 7 of 9
(3,466 Views)

Thank for your help, it solved my problem.

What about the Insert into array?

0 Kudos
Message 8 of 9
(3,461 Views)

The Insert Into Array is just not necessary. All you have to do is wire the graph indicator directly to the bundle function.

0 Kudos
Message 9 of 9
(3,458 Views)