Programmaticaly removing a cursor in a waveform graph

Hi,
Is it possible to programmaticaly remove an added cursor without having to
acces the cursor menu on the waveform graph?
Best regards,
Thijs

You can delete/add cursors programatically through the graph's "Cursor List" property.
=====================================================
Fading out. " ... J. Arthur Rank on gong."
Attachments:
Delete_Last_Cursor.gif ‏4 KB

Similar Messages

  • 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.

  • How do I get the reference numbers for cursors in a waveform graph (other than through an event structure)?

    I want to control cursors in a waveform graph programmatically.  I've tried using the "Cursor list" property, modifying the cursor clusters and writing the results back to the cursor list property, but this only works sporadically.  Modifying the cursors by ref number works well, but you have to get the refnumbers  from an event structure during a cursor event.  Is there any way to get cursor reference numbers aside from through an event structure?
    Thanks!

    Hi barryinbo,
    On the controls pallette, go to refnums> Control refnum>Control. Then right click the refnum and point to select vi server class>Generic > and you will see a cursor there. This will be a "loose typed refnum" but you can right click the refnum to include data type. An alternative is to drag a cursor to the refnum, this will make it strict typed.
    Hope this helps
    Chris Co.

  • 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. 

  • 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

  • Moving cursor to Zoomed Position in waveform graph

    Hello
    I have 2 cursors in my waveform graph and I would like to have the cursors move to the zoomed in position of the graph when I zoom in or out of the graph. Could some please tell me how to do it. Thankyou in advance
    Regards
    Pratheek
    Solved!
    Go to Solution.
    Attachments:
    Failure Device.vi ‏89 KB

    HI Mike
    Thanks for the reply. When I apply the logic to reposition the cursor in the scale range event only one cursor is moving to the zoomed in position. The other cursor remains out of  graph scale. I tried to repeat the same logc but it didn't work.  Could you please tell me how to get the 2nd cursor also in to the scale range. Sorry i'm fairly new to labview. I have attached the pic of what I tried.  Thankyou in advance
    Regards
    Pratheek
    Attachments:
    Capture.PNG ‏18 KB

  • Event structure and waveform graph cursor

    I am utilizing a waveform graph and I need to programatically manipulate multiple cursors based upon the movement of a primary cursor.  I would like to use the event structure to avoid processor usesage. 
    My approach is to create an While Loop/event structure where it goes into a it when there is a "mouse down" on the waveform graph.  Once in it, there is another While Loop/event structure that has two cases: Time Out (set to 25) and a "Mouse Up" on the waveform graph.  In the Time Out case, the primary cursor is read and modifies the location of the secondary cursors.  In the "Mouse Up" case, the primary cursor location is read, other cursors are manipulated, and the While Loop is exited.
    When I code this up and perform a "mouse down" on the waveform graph, the index on the inner While Loop/Event Structure is advancing but there is no control (can't move it) of the primary cursor on the waveform graph.  When I "Mouse Up", the inner While Loop exits.
    Obviously, my approach is flawed here based on my lack of understanding of the characteristics of the waveform graph and cursor manipulation.  Has somebody come up with a way to achieve what I am trying to do?

    This is basically the method I typically used in LabVIEW 7.1 and below as described in this old post.
    Of course you could upgrade to LabVIEW 8.0 and none of this is necessary! LabVIEW 8.0 has events for "Cursor Move".
    Now you only need the "cursor move" and "stop" cases. Isn't that cool!
    Message Edited by altenbach on 12-12-2005 07:05 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    LV8CursorMove.png ‏6 KB

  • How can I get the cursor value from a waveform graph

     Is there a way to get the value of cursor position on the waveform graph so mathematical calculations be performed on those values. We can see the value in cursor legend, but can we extract those values for future calculations in the block diagram somehow.

    Right-click on the waveform graph icon.  Select Create>Property Node>Cursor>Cursor Position.  That spits out a a xy cluster for the current cursor position.
    If you have more than one cursor, you can either set up a loop and set the Active Cursor property node (right click the property node and select "Change to Write") or you can pull everything you ever wanted to know about every cursor with the Cursor List property node. 

  • Dispaying a waveform graph with control of the cursor in the document.

    I would like to be able to control the cursor when I save my waveform graph in html. I'm currently saving the graph through the report vi's

    I am not sure I understand your question. Do you want to simply control where the cursor is on the picture you are appending to the html report. If so then when you use the Append Control Image to Report VI it basically takes a snap shot at that moment and displays it. Therefore you just need to place the cursor where you wnat it before you add the image.
    To programttically control the cursor you will need to use property nodes of the Waveform Graph. A good start would be the property cursor>>cursor position>>all elements.

  • Refresh cursor value in a waveform graph

    Hello, I am tryig to do a vi that can read PNRF files from perception and then it will analyze the data of the waveform, but I am having some problems with the reading of the data
    After getting the waveform graph, I created an event of that waveform graph that would activate each time there is a cursor release, but it cannot work once the sequence reaches that point of the event.  I am working step by step on this vi, and after being able of having refreshed data I will do the same with a second cursor. Also, I cannot find the way to separate the waveformgraph channels into different displayed waveforms, is it because it is a waveform graph and not a waveform chart?
    I am attaching the used vi
    Attachments:
    LabviewPNRF_Reader.vi ‏77 KB

    I have simplified your vi just slightly. You dont need two while loops, two event structures, event structure timeout, sequence structure (read up on data flow using error terminals). I dont have access to the file you are reading so I have disabled that section with a simulated waveform.
    As you can see the cleanup  has messed up your comments etc. sorry about that.
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.
    Attachments:
    LabviewPNRF_Reader[1].vi ‏111 KB

  • Waveform graph:move cursor automatically to know coordinate

    Good Day
    Can i know how to move cursor automatically in the waveform graph
    example: i have known Y =2 what is the value of  x is...
    which properties in property node should i use?
    attached also my vi (Coordinate of XY data using cursor)
    Best Regards
    Ahmad Tarmimi
    Solved!
    Go to Solution.
    Attachments:
    coordinate XY.vi ‏40 KB

    Good Day
    I was trying to program the cursor automatically but it does'nt seem working for me..
    Can you please advise me on this matter... 
    Attached also my study pupose vi
    Best Regards
    Ahamd Tarmimi
    Spoiler (Highlight to read)
    Attachments:
    cursor adjustment.vi ‏53 KB

  • Cursor name position in Waveform Graph

    I lost the cursor name in the waveform graph, after programmed the cursor positions.
    I enabled 3 cursors, shown the cursor names, and programmed their positions in my VI. After running the VI, all cursor names are gone. I believe they are moved to somewhere out of the plot range due to LV malfunction. I cut and copy the graph to the VI attached, and enabled a new cursor, which looks good.
    I need to get the lost cursor names back (manually is OK). I also want to know how to avoid this.
    I am using LV 7.1 under Win XP Pro.
    Attachments:
    Study_Missing Cursor Name.vi ‏71 KB

    I have created a test vi that could generate this problem. I generated a waveform graph and label each peak with cursor name. Then I copied the waveform graph and paste to form another waveform graph 2 in which the cursor name is gone even the show cursor name is still enable. I have not been able to find the cursor names from the waveform graph 2.
    I am using labview 7.0
    HMP
    Attachments:
    test.vi ‏60 KB

  • Saving "Waveform graph" with cursors, set of different colors, in an image file

    Hello:
    I'm trying to save to a file, a waveform of a "waveform graph" that has cursors, which have different colors. When opening the file I can see that the waves are plotted defined color, but the grids and cursors are colored black.
    Someone can tell me what to do, so that the file is saved with the original colors of the "waveform graph"?
    Best Regards

    Probably this is happening because you are using the Invoke node Image Export, which captures an image with less information. However, if your application allows, using the Invoke Node Get Image, which captures your control, displays all the colors of your waveform, include cursors and grids colors.
    In this link bellow, you can see how use this Invoke Node:
    http://digital.ni.com/public.nsf/allkb/5AE4ADCBB65A6D8F86256FBF007A1AC1?OpenDocument
    I hope this helped you. Success in your application.
    Regards.
    Wesley Rocha
    Applications Engineer
    National Instruments Brazil
    www.ni.com/suporte
    Wesley Rocha
    Application Engineer
    National Instruments Brazil
    Visite a nossa comunidade em PORTUGUÊS!!!

  • How to add custom graphical features to cursors in Waveform Graphs

    Hi all:
    I´ve starting a project in LabView, in which I need to synchronise some events with a sound track.
    To do this, I tought that LabView would be the tool of choice, but now that I´m working on it, I
    found my self faced with some serious problems.
    What I want to do, is to represent a .wav sound file in a Waveform graph, and then use the cursors
    to mark some points in the desired places where I want things to happen, but, these events are
    going to be on during some period of time.
    So, it will be natural that some consecutive events might overlap in time, and I need to have
    some control on this.
    The best solution would be to have a rectangular strip attached to the cursors, with a lenght
    representing the exact time duration of the event.
    But this is only possible on my dreams, because I dont see any tools on LabView that aloud us to implement
    any extra graphical features on the cursors.
    But as I learned more about LabView, I found that a user can program blocks of software in C, to implement
    things that LabView does´nt do by default.
    And now I´m wondering if this could be the solution for my problem.
    Is it possible to add new custom features such as the one that I need?
    If yes, how?
    I have atached an image to give a clear ideia of what I need.
    I´ll apretiate any help.
    Thanks
    Attachments:
    LV Custom.jpg ‏40 KB

    No, you can't modify the cursors with either the native or C code. But I'm wondering if you can't get what you want with an XY graph instead of a regular graph. You can have multiple separate plots and some of them can be thick horizontal lines. I've attached a file with just some constants wired to an XY graph to show what I mean. Obviously, you'd have to calculate the values for the x and y arrays in your real situation. If you have to use a regular graph to display the .wav file, you could also overlay a transparent XY Graph on top. The other possiblity is to use a picture control to display your data. There's a couple of shipping examples (i.e. Waveform and XY Plots, XY Multi Plot) that show how data can be represented and Pen Attributes and Sub setting shows how you can draw lines of different widths.
    Attachments:
    Horizontal Bars.vi ‏30 KB

  • How can I programmatically remove a selection of plots from a waveform graph?

    I have a waveform graph to display a number of plots, which I need to programmatically add and delete to as selections of data are chosen by the user for display.
    I've looked under the VI Server Property node and cannot see anything suitable for adding extra plots, or removing existing plots. I expected to see a Plot Data array variable, with each element containing the data for each of the plots on the graph. There is such an array for the annotations, which I can easily edit by Removing Subset for Array, or Insert into Array, but nothing for the plot data. The Value property is a Variant, which I'm unsure how to handle. Should I be working with this perhaps? Can this be done by creating a Local Variable read node? Or am I missing something simple here??
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

    Hi Mike,
    I was trying to use the Property Node (Value) to read the waveform graph, but I was getting a Variant type back, not a 2D array of DBLs as I expected. Turns out I was passing the graph control reference to a subvi whose control refnum had the Include Type flag unchecked. As a result of this explicit definition, Value was of an uncertain (undefined) type and couldn't be natively provided. It would have had to have been cast into a more specific type to work. Have solved the problem by ensuring all my references are of a strict type, and now (as you recommend) the Property Node (Value) is useful
    Many thanks for the response!
    And many thanks for the demo too! You put that together remarkably quickly!
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

Maybe you are looking for