LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sliding window over wavetrain in waveform graph?

One of the things I like with your picture control example is the ability to draw a semi-transparent object so that underlay information can be seen.  I have always wondered if something like that can be done with the conventional graph containers....Don
0 Kudos
Message 11 of 37
(2,223 Views)
I have 8.2 beta, but I see nothing in the graph pertinent to making it automatic (a la the demo you saw).

It does have cursor grab/move events (like 8.0).

Your idea of the third cursor in the middle would remove the need for my keyboard, as you could grab either side and stretch/shrink it, or grab the middle and move it.

However, it might be difficult to accurately select small portions. Perhaps the cursor readouut would assist that.

Your scheme also uses an X-Y graph, so it can color the selected portion separately. Since I have 12,000+ points on a graph, I wonder about the re-plotting every time the mouse moves...

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 12 of 37
(2,221 Views)
the ability to draw a semi-transparent object so that underlay information can be seen.

Yeah, it's the GRAYED-OUT RECTANGLE function which does that. Without that, you have a large rectangle blocking your view.

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 13 of 37
(2,216 Views)
Does v8.2 only have the cursor grab and move events or are there cursor value change events also?  (or maybe the cursor move event simulates a cursor value change event?).....Don
0 Kudos
Message 14 of 37
(2,212 Views)
The cursor-related events are the same as 8.0
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 15 of 37
(2,208 Views)

I implemented my example with an XY graph so I could define the sliding window overlay. If you don't need that, you could probably even use a straight waveform graph.  There may even be a creative way to define the sliding window overlay with a waveform graph but my initial thought was to use the XY graph.

With as many points as you have, 12K, have you considered min-max decimation on your data?  Damien Gray wrote an article on 'Memory Management in LabVIEW.'  I'm sure it can be downloaded from somewhere on ni.com.  One of the topics he discusses is min-max decimation and it could be applicable to your situation, depending on the size of your graphs.  This method allows faster data display.

.....Don

0 Kudos
Message 16 of 37
(2,209 Views)

I did a few more things as time permitted.  I installed LabVIEW 8 and used the 'new' Cursor Move Event to develop the sliding window with 3 cursors as we mentioned earlier.  Then I eliminated one of the cursors and used your 'SHIFT' key strategy.

If I can get the cursor to work as shown here AND underly the plot (as simulated in LabVIEW 7.1 by locking cursor to plot and choosing 'None' for cursor point style), we can do something really cool and simulate the picture control draw grayed rectangle by adding cursors between the start and end cursors.  I'm not sure how to get this to work right in LabVIEW 8.  See thread

http://forums.ni.com/ni/board/message?board.id=170&message.id=200985&jump=true

However, I also need to learn about and experiment with the 'new' draw abilities on graphs.   That may allow simulating the picture control draw grayed rectangle and eliminate the need to try to do the same thing with additional cursor draws.

Michael Cerna posted his sliding window VI on NI FTP site and I downloaded; I hope to have time to look at them today or tomorrow and will post after that.

Sincerely,

 

Don

0 Kudos
Message 17 of 37
(2,175 Views)
ps. Here are the VIs I referred to in the last post.  These are in LabVIEW 8.
0 Kudos
Message 18 of 37
(2,171 Views)
Michael Cerna posted his sliding window VI on NI FTP site and I downloaded;

Can you point me to it? That site has a lot of stuff.

Another thought just struck me (that happens sometimes, despite my best defenses :-):

Instead of an X-Y graph as you did, where the 2nd plot was the selected portion in a different color, suppose you made TWO plots on the waveform graph? The first one is all the data, in the normal color. The 2nd plot is only the selected portion, and it's X0 factor is set to the starting point within the whole waveform. The 2nd plot would overlay the first, to change it's color.

Actually, I seem to remember that plot #0 is painted LAST, so you might have to cange the order, but still. That would look exactly like yours, but not have to be converted into X-Y data.

Just a thought.

Message Edited by CoastalMaineBird on 08-16-2006 12:34 PM

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 19 of 37
(2,169 Views)

I think what you suggest for the waveform graph would work just as is seen for the XY graphs.  When I first was starting the examples, I just happened to playing with the XY graph so I went in that direction.

 

I looked at Michael's VI today. First, in reply 5 of this thread, I erroneously stated there was no cursor visible.  In fact there is a cursor visible and what is moved to move the window.  Sorry about that.  In general, he uses the same techniques as shown in the posted VIs (and described in your last post) to overlay a second plot (in this case on a waveform graph).  Our methods are probably a little more interesting from the standpoint of being able to adjust both window position and length by just using the cursors.

You can get Michael's presentation demos (I4_Cerna_8.0.zip) from:

 

        ftp://ftp.ni.com/outgoing/

 

The VI I specifically referred to was called Cursor-based measurement.VI and it is in Folder entitled 'Time-varying and audio.'

Sincerely,

 

Don

0 Kudos
Message 20 of 37
(2,162 Views)