LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

extract high values from graph

Solved!
Go to solution

Hello,

 

In the attached LabView routine, I am am trying to come up with a method whereby I can tabulate the the values (both the x and y axes values) that return where and at what level the "spikes" occur.  In this example I would like to extract the two values at:

1000000 -40.3316

190193837.04 -37.653182.

Since at these points the spikes occur.

 

The cavet is that these and other spikes can occur anytime and at different levels.  Any help to extract this data will be helpful.

 

Thanks,

hiNi

 

Download All
0 Kudos
Message 1 of 8
(3,771 Views)
Solution
Accepted by topic author hiNI

Use the Threshold Detector VI.

Is the long ramp down at the beginning of the data set always present?  If so you would always delete index 0 before the final output.

Here is a starting point...

 

 New Bitmap Image.png

 And you may or may not want to make the threshold a control or set a different level than I did.

Message 2 of 8
(3,759 Views)

EXCELLENT!!!

 

THANK YOU!

0 Kudos
Message 3 of 8
(3,743 Views)

Hi!

 

How is the issue - to find the closest values (e.g. +/- 5% deviation from exact value) and indices from the graph ?!

 

Here is also my code - there is also some solutions within the Interpolate and thresshold ?!

 

Thanx!

 

Vasco

array-range-values.JPG

0 Kudos
Message 4 of 8
(3,623 Views)

Hi Vasco,

 

You could find the limits and loop through the array to find values. A snippet is below that shows one possible way to do this. There may be more efficient ways to do this - that was the first thing that came to mind.

 

threshold.png

 

If you have any more specific questions, I would recommend creating a new discussion since this forum is nearly three years old and the question appears to be a different from the original post.

 

Regards,

Matthew B.
Offering Manager
NI
0 Kudos
Message 5 of 8
(3,575 Views)

Hi!

 

Sorry for being short with the data and explanation.

 

Basicly I would need to extract the data from the XY graph - at 3 different points with indices (see the graph below).

 

This would help me to explain the system properties - if you simulate - via transfer equation you may get the data (see CD Parametric Time Response VI - http://zone.ni.com/reference/en-XX/help/371894G-01/lvctrldsgn/parametric_time_response), which is not always possible..

 

So my goal was to achieve  - I have settled (set point) value and what is the indices (time) at which this value is achieved - e.g. first time (raise time), becomming steady (2nd issue) ?!

 

Your code was in the LV 13, I have LV12 - so I have done the code for myself. It is not working - could You please look it again ?!

 

Thanx!

 

Vasco

Proporcional-PID-Academic-2.JPG

0 Kudos
Message 6 of 8
(3,545 Views)

Hi Vasco,

 

If you have the Control Design and Simulation module, I would just use the CD Parametric Time Response VI.

 

If not or you don't have the transfer function, you may need to code an algorithm yourself. I am by no means a signal processing expert, but I thought of some things that might help you. To find the crossing time, you could potentially use the Basic Level Trigger Detection VI. To determine when the data has settled, you could calculate a derivative. The steady portion of the signal will have a derivative near zero.

 

If you have any more questions regarding this topic, please create a new discussion forum.

 

Regards,

Matthew B.
Offering Manager
NI
0 Kudos
Message 7 of 8
(3,502 Views)

In this updated VI, what determines the "correct" value of the threshold so that I can only extract the spikes?  Can you explain how the threshold works in this case so that I can determined the best point to put the "threshold" at?

 

Thanks,

hiNi.

0 Kudos
Message 8 of 8
(2,982 Views)