Sliding window over wavetrain in waveform graph?

At NIWeek 2006, Michael Cerna gave a very nice presentation in the area of Math & Signal Processing.  One of his example VIs I believe was entitled 'Cursor-based Measurement.vi' and in it he showed an interesting method of sliding a window over the signal to compute local properties over just that portion of the waveform that the window covered.  The windowed waveform was hilighted in a different color than the remainder of the waveform.  I have done something similar with a set of slide controls that allows the length and position  of the window to be changed by moving the slides.  I am trying to find his example both in the LabVIEW 7.1 and LabVIEW 8 examples and cannot locate it.  I want to see how he did what he did and perhaps modify it so that one can lengthen the window by clicking and dragging rather than inputting a length into a numeric control.  If this example was written in LabVIEW 8.2, I wonder if could possibly be saved to 8.0 and posted here.
Thanks,
Don

IN case anybody wants it, here's a way to use a picture to display the data and the sliding, adjustable window.
It uses a MODIFIED copy of the standard PLOT WAVEFORM vi, modified only to bring out the SCALE FACTORS so I can use them later.
It's not very pretty.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com
Blog for (mostly LabVIEW) programmers: Tips And Tricks
Attachments:
Test Graphing Picture.vi ‏83 KB
Modified Plot Waveform.vi ‏81 KB

Similar Messages

  • Unexpected Windows cursor/Waveform Graph cursor behavior

    Hi,
    I got a very strange Windows cursor behavior with waveform graph. Simplified VI is attached.
    LabVIEW 2014 SP1
    The problem is:
    The VI contains only one waveform graph.
    1. I start the VI. Cursor Movement Tool is selected in the Graph Palette by default. Corresponding “Cross with dot” Windows cursor appears when mouse is moved over the plot area (see image). So far so good.
    2. I select Zoom in the Graph Palette and use it two-five times (second image).
    3. I select Cursor Movement Tool in the Graph Palette again but Windows cursor does not change as it should. It is an open cross now (third image); i.e. the same as shall appear when cross of Graph Cursor Lines is reached.
    4. I click mouse three-seven times anywhere in the plot area and the cursor becomes normal (as in the first image).
    The problem is not only in shape of the Windows cursor. The whole Graph cursor functionality does not work properly if the Windows cursor has the wrong shape.
    Please advise what could cause this problem.

    It seems, i cannot explain the question in good way
    It is not about my data or zooming. It is about strange bahaviour of the Graph. The following sequence of steps illustrates the problem and shows that the zooming is not the issue (or, at least, not the main issue):
    I do the following:
    1. Start the VI.
    2. Select first Graph cursor in Corsor palette and use pop-up menu "Bring to Center".
    3. Zoom couple of times (not too much) keeping the Grapg cursor visible.
    4. Select Cursor Movement Tool in the Graph Palette.
    5. "Open cross" Windows cursor appears from the beginning. I cannot pick up the Graph cursor.
    6. Click left button of the mouse several times in any poin of the graph area.
    7. Windows cursor is changed to the normal "cross with central point".
    8 Now I can pick up the Graph cursor.
    I would suspect problems with zoom until p.5. However p.6-8 are done without any change of the zoom.
    By the way, I found more:
    If I try to move the Graph cursor after p.5, the whole graph moves and fires event "Scale Range Change". It must not happen with Cursor Movement Tool selected.
    I can guess only about some strange setting of the graph. May be I am not aware about them

  • RMS sliding window

    Hi Everyone
    I am calculating the RMS from a 50 sample window (sampling rate 1000Hz). I am using the Biosignal RMS.vi but I want to change the window to use 25 samples before and 25 samples after the point I want  to calculate. I am still new to labview and have been running in circles a little. Help is appreciated! I have attached the VI I am using along with some sample data.
    Thanks again!
    Attachments:
    Raw data.xlsx ‏52 KB
    RMS VI.vi ‏16 KB

    This is basically the same answer David gave you, but stated a little differently.  Consider what you want to do, namely take n RMS value of a 50-sample sliding window.  Let's say your total number of samples is 100.  How many 50-second sliding windows can you "fit"?  The answer is 100 - 50 = 50 (because the first window has Samples 1 to 50, and the 50'th has samples 51 to 100 -- any more windows won't have 50 samples).
    Now consider how you want to interpret the values in, say, the first Window, samples 1 to 50.  The RMS value you compute represents responses over the entire 50-sample period, so you could reasonable say it represents the "midpoint" value (which would actually occur halfway between Samples 25 and 26, but that's a detail).  So if you ran your sliding window over the 100 points, you could say that the 50 points "represent the RMS values of samples 26 through 75".  Note that dealing with the "end points" when doing digital filtering is always an interesting question -- a reasonable thing to do is to start sampling before you need to save the data (say, 25 samples before) and continue sampling after you need to save (say by 25 samples).  Alternatively, throw away the first and last 25 samples, or "make your best guess" at the values (one method is to say "the first 25 samples are the same as Sample 26", or "the first 25 samples are a least-squares polynomial interpolation from points 26-75").
    Bob Schor

  • How do I change the data used by a Waveform graph dependent upon which tab window is active?

    Hi,
    First I want to say thank you in advanced!!  Let me describe the situation a little bit.  My front panel VI (see attachment) has a tab control and on each tab window I have an intensity chart with a free-drag cursor.  Below the tab control window I am trying to display either the row or the column of data where the cursor is located, I can do this for each intensity chart individually.  I am trying to clean the block diagram up a little bit and instead of using 4 Waveform Graphs, I want to use only one, can the data that is displayed in the wave form graph is associated with which page is active on the Tab Control.  Can this be done?  And how can I do it?
    Thank you again,
    ~Daniel DeWitte
    Solved!
    Go to Solution.
    Attachments:
    Changing Waveform graph data.JPG ‏123 KB

    Simply wire the tab terminal to a case structure that switches the data going to the graph terminal
    (sorry,posting by phone, cannot look at your code...)
    LabVIEW Champion . Do more with less code and in less time .

  • Code needed for "putting waveform graphs and 8bit images in the same window by Windraw"

    Hi Micheal, please sent the code example for my question:"putting waveform graphs and 8bit images in the same window by Windraw" , thanks.

    You can start from here ...
    Hope that helps,
    Michael
    Attachments:
    tester.vi ‏97 KB

  • Putting waveform graphs and 8bit images in the same window by Windraw

    How to put waveform graphs and 8bit images in the same window by Windraw VI?

    Use "Invoke Method: Get Image" to get a pic of your waveform graph/chart. Then combine this pic with your 8bit image using the IMAQ tools (IMAQ ImagetoImage). If you need an example send an e-mail again ...
    Michael

  • Integral of waveform graph to calculate area under curve over time

    Hello ,
    Please find my attached VI and please help me for integration to get area undercut for my waveform graph.
    I would like to find total  Energy output from my wind power  waveform graph oever one month period of time.
    I believe i have to integrate to get area under curve and so i m now using integral tool in labview as attached. 
    As I don't have expected ans for my result and so i want to make sure the tool that i m using is correct.
    Please advise me which method of integration shall i use for my graph.
    Solved!
    Go to Solution.
    Attachments:
    Wind data only.vi ‏134 KB
    wind data.txt ‏1253 KB

    I don't know about your calculations to get the Wattage.  But as far as integration, you really should supply a dt (sample rate) in order to get a proper energy measurement.  I would use your second integration method (the one with "Result" as the indicator) and give it the dt as well.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Transition measurement vi cursors displayed in waveform graph are moving outside of scale

    Using a waveform graph to display pressure over time. I wanted to be able to calculate the fall time of the pressure over time so I'm using the Transition Measurement vi. I copied exactly what was in the example for transition measurement inside help and it is correctly determining the falling transition time but I am having a problem with the cursors on the waveform graph. I should be seeing a set of green vertical cursors marking out the fall start time and fall end time like in the picture I've attached (capture2) like in the example. The problem is they both always start at 3.43 (capture1) and after each sample period they increment by one (4.34, 5.34, 6.34) The come right out of the bundle from the transition measurement output as those numbers. The period of the signal I'm interested in is always less than 2 seconds, so I never see the vertical cursors.
    I've tried substituting my daq signal with a sine wave generator and it does the same thing.
    The block diagram is in the first capture
    also I would be interested in finding out exactly how the numbers wired to the active cursor property of the property node for a waveform graph relate back to the actual cursors on the graph. Are they just automatically numbered starting with 0 from the top-down?
    Wayland
    Solved!
    Go to Solution.
    Attachments:
    Capture.PNG ‏44 KB
    Capture1.PNG ‏7 KB
    Capture2.PNG ‏29 KB

    Hi Wayland,
    The reason the cursors are always apparent in the example VI for the Transition Measurement.vi, is because the signal being generated is always resetting. So, the signal resets to a 'new' signal for the cursors to go over and therefore always remain in the somewhat same location. The Waveform Graph is also configured in such a way that it will not move or continue to show new data coming in, the data cursors have moved onto. So in your case, you will want to right click the graph and make sure "Ignore Time Stamp" is not checked/selected. This will make it so the graph keeps up with your incoming data and the cursors. You can check this in the example file by removing the True Constant going to the waveform generator and changing the time stamp option previously mentioned.
    In order to view the available cursors and their numbered position, you can right click on the Waveform Graph and select properties. In the properties window there is a Cursors tab, inside this tab at the top is a drop down menu that lists all of available cursors, indexed starting with 0 at the top.
    -Jake B.

  • Publication Quality Image Files [.TIFFs] of Waveform Graphs or Waveform Charts?

    I'm familiar with the Knowledge Base Article 2PP7CM7Y, How Can I Save a Front Panel Control to a JPEG, PNG, or BMP File?
    My problem is that the resulting pictures are nowhere near publication quality [i.e. the kind of thing you could import into Acrobat for submission to an academic or technical journal]. For instance, I've attached a PNG of an Electrocardiogram [ECG], called "ecg.png", that, in all honesty, doesn't deserve to be posted on a website, much less imported into an Acrobat document. As far as I can tell, I'm using all the high
    est settings [24-bit color, no compression].
    Does Labview have any other utilities for saving to industry standard image formats, especially high-resolution TIFFs? I know the information is there, because when I print the VI's Front Panel to our 600dpi laser print, I get really beautiful, publication quality prints. My suspicion is that whoever wrote the "Invoke Node/Get Image" VI [and/or the various "Graphics Format/Write File" VIs] simply took a snapshot of the graphic card's [VERY low resolution] video buffer, rather than calling the underlying software logic that gets invoked when you print to a 600DPI laser printer. Is there any way I can get access to that underlying software logic?
    Thanks!
    Attachments:
    ecg.png ‏693 KB

    Okay, I installed the HP PostScript drivers, but, as far as I can tell, there is no option to 'Save to File.' [Such an option may be there somewhere, but I looked all over the place, and I couldn't find it...]
    Besides, the idea of saving to PostScript, and then running some program like 'ps2png' or 'ps2tiff' is not very appealing to me, for at least two reasons:
    1) It's very batch-file-ish in nature, i.e. I've got to download some monstrosity like Ghostscript, get it installed, get it configured [no trivial task in and of itself, believe you me], then write some batch-file-ish thingamabob to open the PostScript file and process it - I'd much prefer to [at the very worst] make a call straight to a DLL from within a Labview VI. But that's o
    nly the start of my woes; once I've got a PostScript file, I've got to figure out some way to cut just the picture of the Waveform Graph from the larger picture of the VI window - I suppose I could use some sort of a Clipping Path or an Encapsulated PostScript Bounding Box, but at this point we've clearly crossed over into the realm of what I would call 'hideously ugly, grotesquely inelegant, batch-file-ish hack.' Plus, my gut instinct is that it would take a bare minimum of a week or more to get such a thing up and running efficiently, when, if I could make a call straight to the Labview printing infrastructure, I could do it in just a few minutes.
    2) It's very, very difficult to venture into the realm of PostScript software [especially Ghostscript] and keep your project from becoming contaminated by the GPL, or worse [the Aladdin license agreement ain't exactly a stroll on the beach].

  • Sliding Window Averaging

    Can someone tell me the best/easiest way to do sliding window averaging on
    my data. I'd like to do sliding window averaging over say 10 points. I use
    VB6 and Measurement Studio 1.0/CW3.0. I can't seem to find an obvious way
    to do it from looking through the help files.
    Thanks

    Hi,
    It looks like you can definatelly use some of the DSP or statistics functions from Measurement Studio. Here are a couple of pinters:
    Take multiple samples and perform averaging. Instead of recording a single point every second I would recoment acquires 100 samples @ 1000 Samples/Sec; get the average of those samples and send that to the graph and to the moving average. This will clean up a lot each data point (specially when working with load cells in something that is changing mass).
    Take a look at the functions in CWStat; there is a linear fit function that you could use to extrat the slope information without the need for averaging, It uses the least squares method; so the result should be accurate.
    If the data has lots of noise yo
    u can perform some filtering; probably a Butterworth low-pass filter (found in CWDSP) could help reduce the high frequency variations on your data and give you better results.
    There are some good example that ship with MStudio that can help you get started with the DSA and Stat function. Also the MStudio reference help contains some valuable information and small pieces of code.
    I hope this helps.
    Regards,
    Juan Carlos.
    N.I.

  • How do I Get the value from a mouse click - on a waveform graph?

    If I have made a plot into a Waveform Graph and later want to do a zoom of my data
    (Not zoom into the Waveform Graph, but regenerate the data). How do I read the mouse
    coordinate if I click on the graph window. I know how to put up the horiz and vert
    cursors but don't know how to just read the mouse click. I would really like to
    follow the windows standard that identifys a rectangle by clicking and draging and then
    be able to read the corners of the rectangle. Thanks, Rick
    PS: Using Labview 6i

    I would recommend to 'translate' your graph in a picture and dislay it in a picture control (see picture examples in LV6).
    Once you did it, pictures have an extremely useful property called Mouse that returns the mouse coordinates and click events when you place the cursor on the picture.
    By this you can re-arrange the graph on picture appearance.
    There are also other methods such as using a Window's API that returns the mouse position referred to the whole screen window, but I believe this would be much more difficult to implement.
    Let me know if this was clear and if you need an example vi.
    Good luck,
    Alberto

  • Center the cursor on the Waveform Graph?

    I have a waveform graph where the user can adjust the scale on both the X and Y axes.  The "problem" that I am having is that if the scale's range is set too far from where the cursor is at, the cursor will be off screen and not selectable.  So, I am trying to center the cursor to the scale when the scale is changed or via a button.  Here is the code that I have written for one of the Cursor plots:
    Select Case setBlueCursor
    Case 1
    blueCursorPt.Plot = plotInlineTorque
    inlineTorqueMax = yAxisInlineTorque.Range.Maximum
    inlineTorqueMin = yAxisInlineTorque.Range.Minimum
    blueCursorStartY = (inlineTorqueMax + inlineTorqueMin) / 2
    blueCursorStartX = (XAxis.Range.Maximum + XAxis.Range.Minimum) / 2
    blueCursorPt.YPosition = blueCursorStartY
    blueCursorPt.XPosition = blueCursorStartX
     This code will center the cursor like I want but then I can't move the cursor after that as it is "stuck" at the position that I have coded it.  The problem appears to be with the last two lines of code here.   I do not know of any other way to do this though.  I have tried the "moveCursor" method but the end result ends the same way, with the cursor stuck in the center and can't move.  Any help on a solution?  Is there a better, easier way to do this?  I'm new to Measurement Studio and .NET. 
    Thank you

    This code works.  It appears that I was calling the subroutine that this code is located in over and over in another part of my program. 

  • Bug in Digital Waveform Graph X-Axis

    Hello,
    I am making separate queried to a database to retrieve analog and digital data over the same time period.  The data were logged at 2 second intervals.  I have verified that both result sets return the same number of values with the same t0 and dt.  I then plot the analog values on an XY Graph and the digital values on a Digital Waveform Graph.  I then use property nodes to sync the two graphs (left and right plot bounds, XScale.Range, and Cursor Position.X).  After doing this, I can see that the datasets do not line up between the two graphs.  The data on the Digital Waveform graph ends several seconds sooner than the analog data.  The x scales of the graphs appear to match but the plots don't align in time.
    Has anyone else observed this behavior?  Is there any work-around?
    Thank you,
    Peter

    There is a much simpler way to synchronize these charts. Just use a stacked chart.
    If you use a bundle function you can take two signals (almost data type) and wire them into a Waveform Chart together.
    Then on the front panel right click on the chart and select Stack Plots
    Since you only have 1 X axis now they are instrincly synched and will always write valules at the same time and update the UI together. You can skip all of the scale synching....
    Since the data you are working with has lincked time stamps, the data will need to be matched, (make sure the samples are anyched and each itteration both would have the same number of samples.
    The last allternative would be to strip the time stamp off of your data then build a new data structure, with the digital data, analog data and 1 set of matched time stamps. You can then plot this on an XY chart using the time stamp for the X axis for both of your other plots.  Let me know if you have other questions.

  • How plotting on a digital waveform graph the bit transition in function of the time

    Hi everyone,
    I am using LabView 6.1 on a Windows XP computer. I am to plot output bits sequences on a digital waveform graph just before sending the information to a board.
    So far I can see the transitions for my 16-bit port (16 plots) but the width of a pulse is always identical, no matter what times I enter. I wired my 1-D array timestamps to the property node Xscale.MarkerVals[] of my digital waveform graph... but it doesn't seem to affect my plotting...
    Thanks in advance for any help concerning this problem.
    Jonathan Sabah

    Well here is piece of my VI with the necessary sub VI.
    I also want to hide/unhide plots... I have found how to hide.. but cannot figure out how to unhide.
    Any help please ?
    Thanks again
    Jonathan
    Attachments:
    Exemple.vi ‏58 KB
    Setup_DIO64_for_Output_1.0.vi ‏111 KB

  • Display many hours in waveform graph

    I'm testing a way to collect the output voltage from a power supply into a waveform graph and display the values in relation to absolute time over a few hours.
    My problem is that I can only see the last few seconds in the graph. In addition, the absolute time on the right side of the x-axis is correct, but as the time is running, the left side of my x-axis show a time that is in the future. This should have been the time when the relating y-values had occured. 
    Do you have any ideas how to solve these challenges?
    Attached you can find my VI.
    Attachments:
    Test2.vi ‏125 KB

    You could use an x-y graph like the attached example.
    Andrew Alford
    Production Test Engineering Technologist
    Sustainable Energy Technologies
    www.sustainableenergy.com
    Attachments:
    value vs time.vi ‏14 KB

Maybe you are looking for

  • How to change numbers of PDF file in Adobe Acrobat Pro Extended #9

    I just combined 3 PDF files that had their own numbering into one. I have searched how to change this file into a consecutive numbering with no success. I do the steps outlined to open the Number options, but when filling in the blanks, and making ch

  • What's the difference between boxing and unboxing?

    What's the difference between boxing and unboxing, I'm a bit confused? Is autoboxing the same as boxing? This is what I know so far: -This is boxing, i think: int  []arrayset = {1,2,3};but I don't understand what unboxing is, can someone explain it t

  • Tell me where sould i specify in XI about target system

    Hi all! My scenario is like this: File->XI->J2EE application, am using HTTP adapter as receiver. Where should i specify for my XI about the (J2EE appli)target system. Your help is greatly rewarded Thanks

  • SunStudio 11 cannot link libtiff in Solaris 10 (undefined symbol)

    Hello we are producing a software using multiple external libraries, among them Sam Leffler's TIFF library version 3.6.1 This software compiles and runs well on Solaris 9 / SunStudio 11 But in Solaris 10 / SunStudio we get an 'undefined symbol' error

  • How to set a value in dashboard prompt based on user id

    Hi i have a requirment like i need to set a dashboard prompt value based on user's login.i.e.if i login as administrator the adminstrator is belongs to circle(my requirment)then the circle name willbe displayed in dashboard prompt . if any idea pease