LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sliding window over wavetrain in waveform graph?

OK, so he is doing just what my last idea was - overlapping a short plot on top of the long one, so it can be in a different color.

There are some artifacts I don't understand - when the frequency is really high, the yellow window DOES NOT cover up the gray signal. But if you make the graph larger, it does. It's some sort of drawing artifact.

In my case, I don't want the WIDTH control to be separate - I want a START and an END cursor and to move both together normally, or if SHIFT is down, you move only the one you grab. But that should be do-able.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 21 of 37
(1,767 Views)

I think your strategy using the 'SHIFT' key is really good and the example (Sliding_Window_method_CMB_lv8.vi) I posted using that technology was just a variant of what you had done earlier (with few locals and all event-based now that LabVIEW 8 has cursor events).  My only problem with it is that it is not cross-platform. 

If you need cross-platform solution, I think the 3-cursor method I showed in my other example (Sliding_Window_method_roth_lv8.vi) is the possible solution.  Not sure without the 3 cursors how you would be able to adjust the window width without a separate width control.

For some reason, I had thought MIchael was actually sliding the window just using the mouse with no cursor at all.  But I guess I had NIWeek euphoria to have thought that. But maybe there is a way to do that with two stacked slides placed directly onto the waveform graph similar to my original implementation but with the slides being transparent.  Hmm, might have to try that at some point.

Sincerely,

 

Don

0 Kudos
Message 22 of 37
(1,760 Views)
Here is code that combines some of the technologies we have been discussing, and adds in the option of drawing an overlay subset window on the XY graph using the 'PlotImages' property as compared to using an overlay plot.  I also draw a 'gate' between the two cursors because my upcoming waveform analysis requires a Y threshold capability.  I would prefer to use the 'PlotImages' method. The only thing I do not like about the 'PlotImages' method is the 'flashing/blinking' observed vs. the totally smooth operation of the plot overlay method.  Not sure that is possible to rectify.
0 Kudos
Message 23 of 37
(1,729 Views)
One thing I have to think about is how to erase an existing drawn object on a graph using the 'Plot Images' capability at program start. At program close, one way I have implemented is to overdraw using transparent color, thereby effectively erasing.  But sometimes I want to study the graph and object after the program close, so I don't want to execute an erase then.  It is only after the program is restarted that I want to reinitialize and remove the drawn object.  We almost need an 'erase first' method such as what exists for the picture control.
0 Kudos
Message 24 of 37
(1,686 Views)
.....Been meaning to close the loop on this one.

It turns out to be easy to erase objects during initialization by just creating the 'PlotImages' property node and right-clicking to create an empty picture control constant (see attached).

Sincerely,

Don
0 Kudos
Message 25 of 37
(1,620 Views)

Hello to everyone in this thread,

I am trying to do an sliding window to a waveform to analyze just a portion of time that it might to be selected in the graph ..

I have been trying to modify the examples that you posted here in the past but my problem focus on make an analysis in another graph .. not just to appear in another color in the same graph ..

Let me explain better ..

The selection that i made by the graph needs another analysis in other graph .. like some FFT analysis ... but I have been trying to get and output of the selection in another graph and I can't ...

Please somebody can send me a hint or way to do it ?? ..

Thanks ..

0 Kudos
Message 26 of 37
(1,343 Views)
Once you have selected your window, use the Array Subset function with window start as your index and number of points in the window as the length.  The Array Subset output is now your windowed region available for further processing......Don
0 Kudos
Message 27 of 37
(1,342 Views)

You can read the cursor values via properties in the selection graph, then use those values to pick out a piece of the data for further processing.

 

Just use a property node and choose the CURSOR LOCATION property (probably just the X value). 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 28 of 37
(1,340 Views)

Thanks for your reply ..

I will try the option of the array subset .. because I dont have a good knowledge of the cursor properties ... but sure that I am going to review it later ...

I will tell you any problem that I have ..

Thanks ..

0 Kudos
Message 29 of 37
(1,321 Views)

Ok is working for what I need ..

There is still one single thing ... in the waveform that I am working, the Xaxis is in time (usec) and the sliding window works for the number of elements in the array (which is logic) .. I just need to change in the Xaxis the number of elements by the time of the waveform ..

I could be easy if you know the right blocks to figure it out .. let me check .. and if you have any suggestion please let me know ..

But how to change only the Xaxis ?? .. I just need to multiply it by 0.2 usec ...

I really appreciatte your help

Thanks ...

0 Kudos
Message 30 of 37
(1,312 Views)