LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create new array from waveform selection

Hello...

I need to build a VI to create a new array from a segment selected from a waveform. The situation is: I have a waveform with 2000 seconds (sampled at 1 Hz), plotted in a graph. While the waveform is whole plotted in the screen, I want to be able to click and hold  with mouse in any point of the waveform, while holding mouse key, I want to move the mouse selecting the waveform (to be able to select a good period of waveform) and while I am selecting the waveform, a numeric field is showing the size of the selection (delta in seconds). But I need that this numeric filed refresh the value while I am holding the mouse (as I move the mouse and increase or decrease the size of selection, the numeric filed updates immediately). When I reach the desired size in seconds of selection, and release the mouse key, I need that a new array had been created or filled up with only the values under previous selection.

I've tried many things but everything fails.

Attached is a ASCII with 2000 seconds, sampled at 1 Hz.

Thanks in advance any kind of help.

Daniel
0 Kudos
Message 1 of 10
(3,537 Views)
Hi Daniel,
you can add a cursor to your graph, select the "snap to point" option as lock style. you can move the cursor by clicking on it. Read both cursor positions "start" and "end" and use this values to get a subset of your waveform.

Mike
0 Kudos
Message 2 of 10
(3,527 Views)
Hi Daniel,
attached is an example of what i mean. Hope it helps.

Mike
0 Kudos
Message 3 of 10
(3,522 Views)
Hello Mike...

Thanks for attention

I viewed the VI that you sent.... But I think that is not exactelly what I need... because after I clicked on run button, one waveform is presented to me, but after I move the vertical line to any point of the graph and click the button SUBSET, a blank graph was presented to me.... I need a way to see on the screen two vertical lines, and I need to be able to move these two vertical lines to the point that I want, after I move the lines to the desired places, I need to click SUBSET and the waveform that was contained between the two lines, is showed in the graph, its what I need.

Another thing, the fields FIRST and LAST are indicators, but them remains with zero values all the time, I moved the vertical yellow line to many places and the fields were always zero.

Thanks in advance

Daniel
0 Kudos
Message 4 of 10
(3,496 Views)
Hi daniel,
move the cursor to the start position. press the CTRL key. move the cursor while pressing the CTRL key to the end point. release the ctrl key first if you are on the end point. If you do that, i think it is exactlly what you need.

Mike
0 Kudos
Message 5 of 10
(3,483 Views)
Hello Mike...

I was not using the CRTL key... sorry.... Now it is really working like a charm!

One thing that I am trying to do is insert an active numeric display that indicates, as long as I select the region with mouse, the size of the selection. This way, I can release the mouse when the segment reachs the size that I want, but I got no success doing this.

Is there any way to hide the horizontal yellow line of the selection tool?

Thanks in advance for the help and attention.

I am a beginner user.... sorry for too many questions.

Daniel


0 Kudos
Message 6 of 10
(3,478 Views)
Hi Daniel,
 
One thing that I am trying to do is insert an active numeric display that indicates...
add a mouse move event and insert the property node which gives you the cursor x position. Don´t forget to connect all other wires.
 
Is there any way to hide the horizontal yellow line of the selection tool?
Yes, you can change the "cursor presetation" (sorry i´m not sure if this is the correct name Smiley Sad (german = Cursor Darstellung))
 
Attached is an LabView8.0 example with the changes.
 
Mike
0 Kudos
Message 7 of 10
(3,450 Views)
Hello Mike....

Thanks again for attention...

I explored the properties of the graph and now I know how to change the color, tickness and other things of the selection tool...

You inserted in the VI a field that has the active value of the cursor, but I don't need the actual value (the actual position of the cursor), I need the difference between first and last point. And I need that these fields refresh automatically as the cursor moves.

When  I pushed down the CRTL key, I need that the VI register the value and as I move the cursor I need that the field show me how many points had been selected from the first point (CRTL key down), until the actual position. This way, I can release the CRTL key only when the desired value (first point minus last point) get reached.

Another problem is that instead of using a graph where the X values are the absolute number of the point (first, second,..... until 2000),  I need to modify this VI to work with a graph with X values and Y values. Because I need that the first field, last field and the difference between first and last, being showed as the real values of X axis.

I've forgot to mention that I need this VI to work with XY graphs, sorry.

Attached is a VI which I try to insert the field with the difference between the first and last point (refreshed automatically as I move the mouse), and I tried also to insert a XY graph, both tasks I got no success.

Thanks again

Daniel
0 Kudos
Message 8 of 10
(3,429 Views)

Hi Daniel,

see the attached example.
Hope it helps.

Mike

0 Kudos
Message 9 of 10
(3,375 Views)
Hello...

This VI works like a charm!! Thank you very much for your attention and help...

Daniel
0 Kudos
Message 10 of 10
(3,355 Views)