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

Similar Messages

  • How to force waveform graph cursors to show Y value on more than one plot?

    Hello
    Is it possible to show more than one Y value on waveform graph cursors?
    Thanks in advance.
    Pawel

    Hi Dennis
    That is correct, on graph woth multiple plots I want to display multiple Y values of plots at the same X value.
    I know I can use property node to access cursor list etc. and this is how I have done it, but my question was rather if it is possible to force the cursor legend to display more than one Y value (as a native display). As a default it displays one value and you can choose which plot you want to stick to, but it would be a great feature to have possibility to expand cursor legend to display more than one value.
    The question has nice consequences. If it was possible, you could use a property node to export image of the graph, control sizes, or even simple "copy" data from the popup menu. Otherwise we need to "artificially" glue the exter
    nal controls displaying Y values if we want to export pictures, etc.
    But since you did not answer that I supose it is not possible, as I thought.
    thanks anyways.
    kind regards
    Pawel

  • Combine waveform chart and waveform graph

    I would like to combine the properties of waveform charts and waveform graphs, i.e. I'd like both continuously changing and fixed graphs at the same time.  Specifically, I would like to display one waveform as a fixed, unchanging background, then display another waveform on top of this background while my code is running, as data arrives from a DAQ, point by point.  Is this possible?  Thanks!

    The answer is to use XYGraph.  See attached example.
    Attachments:
    plot_two_waveforms.vi ‏29 KB

  • 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

  • Data acquisition and waveform graph plot

    Dear All
    My signal is out put of current transformer which is 2v dc. I succesfully configure usb 1208fs with labview8.2. Now I want to plot my input signal on the waveform graph in frequency vs amplitude(db). Can any one guide me how can i plot my data?

    Hi,
    Could you strip the VISA stuff and re-post your VI so I could run it and see where is the difference coming from. A few observations though
    1. Always try to wire from left to right and top to bottom so that your block diagram code is readable.
     2. A waveform graph gets completely redrawn everytime you give it soem data ao it is typically used outside any loops. If you want to display a waveform inside a loop, it is better to use waveform chart.
    Regards,
    Ankita

  • Calling a VI in a subpanel with parameters inside an event structure and using an abort button

    Hi all,
    I have a control panel with a tab control and two tabs have a sub panel in them.  At runtime I load the VIs I want in to the sub panels.  In the control panel event structure I want to start each of the VIs and monitor the execution state so I can abort the VI while it is running.  One method I use can run the VI and the abort event will work (see example).  The second method I use does not and this is what I want to do!  I have many inputs to the VI I want to pass so placing the VI in the event blocks everything else and it has to wait until the VI has completed, so I cannot monitor the execution state.
    I have attached an example of what I want to do.
    Any help appreciated.
    Martin
    Solved!
    Go to Solution.
    Attachments:
    SubPanel.lvlib ‏2 KB

    Hello,
    You can do this with queues. 
    The main vi and subpanel vi's should be based on the producer/consumer (events) and you handle the front panel events accordingly in the respective vi's. 
    Name the queues in obtain queue , for example the Main being MainQ, subpanels SubPanel1Q, SubPanel2Q. When you start the application, initialise the main vi and also run both of the subpanels (just to make sure that the queues are first obtained by themselves). Then you can use obtain queues to do inter vi communication.
    For example if you need to send data from main to subpanel1, use obtain queue and use the name SubPanel1Q, pass the required data & command and voila. Subpanel1 vi will receive your message. You can do this anyway you want. Hope this helps.
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

  • Event Structures and Do /While Loops

    I have an Event Structure inside a Do/While Loop.  One of the buttons in the event is STOP which stops the do while.  The Stop Button itself is inside the event as suggested in the help.  My problem is when I hit the stop button everything inside the Do/While runs 1 more time.  Other than than the code works perfectly.  is this normal behavior for a Do/While ..Event Structure??

    The attached file is the code in a nutshell.  I know it can sometimes be diffcult to TS w/o the actual code.  Prob is I wrote it in LV2011 on the Lab PC and I have LV2010 at my desk.  I don't have internet access in the Lab..of course.
    If I hit the OK button 2x's it "does something...does something...build array" then again a second time.  The build array is added to with each click of a button in the event structure.  If the user hits the STOP it dumps the 2x's worth of data out to excel..except I get 3 rows of data rather than 2...as if the inner loop ran one more time.
    Anyways. the only thing that caught my eye is the fact that I don't have a sequence structure around the "build data here" portion of the code.  Would that affect how the STOP inside the do while loop is handled??
    Attachments:
    event_Do_While.JPG ‏90 KB

  • Event structure and a cluster - lagging input

    I am running into problem using a cluster of controls that I want to use with an event structure. Each control tied to an event case. Simple enough.
    I used the cluster because the number of controls I am using is quite large. The problem is that I need to read the cluster to get the latest state before I unbundle and handle the event. The issue is that in order to pull this off, I need to use a local variable of the cluster for each event. Since the event structure could have ten or so cases, I end up with ten or so of the reviled and maligned local variables. 
    The cluster has great advantages for what I am doing, but the local variable break old taboos in the LabVIEW style rulebook.
    I am attaching a micro-version of the vi so you can see the problem. You have to imagine expanding this to a lot of event cases to see the problem. Below the simple front panel is the real front panel I want to work with just so you have an example.
    So, am I wrong to use the variables and should I break the cluster and lose it advantages, or is this a valid use of the local?
    For those of you that don't see why the locals are needed, just run the vi. You'll see that the direct wired version always lags one state behind the control. The reason is that on an event trigger (toggling the boolean) , the last state of the control is already at the event structure boundry. The event code executes immediately with the previous data. Putting the local inside forces the case to read the current state of the control and use the correct data.
    Long winded and not much meat, but somebody must be bored out there and willing to jump into the fray.
    David A. Taylor
    Attachments:
    Clusters and events.vi ‏19 KB

    Ray.R wrote:
    which route?
    the bottom one is going to give you the wrong value which is what he had as a problem..
    OR
    you probably mean something similar to what I posted, but got the reference from within the Event Structure... Yeah, I also prefer that one
    The latter, it ties the event direct to the control triggering the event, and you could use it for several boolean controls.
    Now in total retrospect, the event (Value Change) will also output the 'New Value', so there's actually no need for the local/reference.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Use event structure and while loop in parallel

    Hello, I would like to use an event structure in parallel with a while loop. I have a camera that needs to constantly take pictures and I have that setup in the while loop. I also however need to do other functions in conjunction with the picture taking. I have about 50 or so events that need to have access to while the pictures are taken. Is there any way to do this? If not is there any way to have a global stop variable that is attached to all 50 of the events. I know I can do this the hard way and have each boolean event in the event structure be attached to the while loop stop control. This is however very inefficient. I would also like to know if I can simply use a mouse click as the stop of the while loop. Am I able to have a variable that goes from false to true on mouse click without using the event structure to do this? Thanks.

    Yes, just place the event structure in a second while loop.
    Add a stop button to the other while loop and add an event for the stop button to stop both loops. For a simple example, see my VI posted here:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=176367&jump=true
    Simply add more event cases as needed.
    LabVIEW Champion . Do more with less code and in less time .

  • Event structure and automatic queueing of events.

    I have found out the long way that the event structure queues all the events taken place while it has been executing yur most current event.
    In other words... I understand why the locking of the front panel is an automatic option that is selected. As it will prevent you from queueing more events,  and causing yur program to execute endless event structure runs, when you wanted it to stop 15 button presses ago.
    case in point.... is in this simple VI i attached.
    My question is ... is there a way to turn off this automatic queueing of events??
    Attachments:
    EventStructureHUH.vi ‏53 KB

    Well ... the problem for me... was, for example, in the VI I posted....
    The OK button in the VI I posted, has an event triggered to it in the event structure.... So when I enter that loop after hitting the enter loop button... it registers those OK clicks...
    Say the OK button and NOT the continue button takes me out of the little loop and back into the big loop. Now, after leaving the little loop and entering into the big loop, I will immediatly enter back into the event structure to handle the OK button click.
    Basically I wanted one button to control the termination condition of the little loop, but also have an event in the event structure associated with it, so basically one button to exit the little loop AND the big loop.
    I hope Im making sense. I found a solution, by just making two buttons, when entering into the little loop, the one button dissapears... and vice versa when entering into the big loop. So to the USER it appears like ONE button... but in the code its actually two.
    I just wasnt sure if there was another way around it... it was tough to figure out what was really happenening in my code... took my about an hour or two to track down.
    EDIT: Yea.. thanks for the reply....  as for the comments in my code... yea, I get a little crazy towards the end of the day... after 6-8 hours of straight labview programming. 
    Message Edited by MJBrehm on 06-30-2006 02:21 PM

  • Continously and waveform graph

    Hi!
    In my program Im recieving sampled data from hardware
    via COM port.
    If I want to display the data (voltage values) in
    "realtime", continously, Is it possible to use
    "waveform graph"? It seems to me that only "waveform chart" can be doing that. Can "waveform graph" only handle "finished" arrays(finished means "loop is done" and no more data to enter the array)?
    The reason I ask this is that I want to have a correct timeaxle according to samplerate from hardware.
    To be able to have correct time between the plots I am maybe forced to read data a certain time and when this time is reached the array is done and I can use the "waveform graph with bundle"?
    Thanks Fredda

    A waveform chart is used to append te data as it is acquired, the graph collects the data and then graphs it at the end. And yes you can collect your data and then output it to a graph when you are done sampling.
    This link tells the differences in slightly more detail, hope this will help you out.
    http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/95fee9f5b252507e862562ba00007657?OpenDocument

  • 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

  • How do I get an event-based response to a graph cursor change?

    I want to respond to the user moving a cursor on a data (X-Y) graph. (LV 7.0)
    What I really want is an event called "Graph.Cursor.Value Change", which would supply me with the new coordinates, but I see no such event.
    If I use the MOUSE MOVE event to trigger obtaining the cursor values, it does not give me an event, until the cursor has stopped moving, the button is up, and the mouse moves off the cursor line.
    Sure, I could use a TIMEOUT event, and read it every 100 mSec, but I don't like the time lag.
    What I did was to set a flag TRUE on Graph.MouseDown and FALSE on Graph.MouseUp. I then choose an event timeout of 10 mSec or -1, depending on that flag.
    That works, but is there a more direct way that I'm missing?
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

    No, unfortunately there is not.
    To code around this limitation, I typically use the timeout event in a more complex way as follows:
    The timeout is wired to a shift register that is initialized with "-1" (no timeout). The value from the shift register then crosses the event structure and feeds to the shift register on the right in almost all event cases.
    I add two special event cases:
    (1) "graph-mouse down" puts a small number (e.g. 10ms) in the right timeout shift register
    (2) "graph-mouse up" puts again a -1 in the right timeout shift register
    (x) All other event cases (incl. timeout) wire the current timeout straight across to the right shift register.
    The timeout event contains the logic to read the graph cursors and associated actions.
    This way there is normally infinite timeout. Once the mouse goes down on the graph, the timeout executes at relatively rapid succession until the mouse is raised again. At which point everything quiets down.
    LabVIEW Champion . Do more with less code and in less time .

  • Run-Time Menu and Event Structure~~HELP~~

    Hi, brothers,
    I'm new user for LabVIEW. Use the version of LabVIEW is 8.6
    One problem describe as below:
    Can Run-Time Menu and Event Structure exist simultaneously?
    Without Event Structure, Run-Time Menu works well, but Run-Time Menu works abnormally.after adding Event Structure,
    How do I modify the problem?
    Thank you for your help.
    Attached is the program.
    Attachments:
    PC_Adjustment.zip ‏44 KB

    Yes they can coexist, but not how you did it.
    Every iteration of the while loop you wait for an event in the event structure, and you look if the user has selected anything from the menu.
    To get this working you should add an event for <this VI>\Menu Selection (User):
    Ton
    PS you should add a stop button, the only way you can stop the VI is hitting the 'emergency stop' button, with hardware connected (like you have) this is not the adviced routine
    Message Edited by TonP on 09-26-2008 07:34 AM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    Main_BD.png ‏5 KB

  • Front panel locks with event structure loop and another while loop

    Hi,
    Why is the front panel locking after changing the value of the "boolean switch" twice? This problem disappears if I uncheck the "lock front panel" option in the event case. However I don't understand why that is the case since the event structure loop has already finished executing.
    thanks

    Do you really want the event handling to stop after detecting the first event? If so then as Christian says the event structure will cause the front panel to lock. What you can do is dynamically register and unregister the events. You right click on the event structure and enable "Show Dynamic Event Terminals" Then  you can programatically register and unregister events.
    Here is your vi modified to do that.
    Edit: Just in case - right click on the control and create a reference. When selecting the source of the event in the structure look under the dynamic section.
    =====================
    LabVIEW 2012
    Attachments:
    event structure test.vi ‏13 KB

Maybe you are looking for

  • My apple id is not work in itunes stores

    my apple id is not work in itunes stores

  • Can't use certificati, with version 4, it not run

    for use an bank account, I use an security certificate, but with version 4 don't run, I can't send the certificate, I think that I can send with an normal Email, with an allegato

  • Info on Delta Queues

    Hi, We have recently activated PM, MM & QM related Business contents and started taking the data in BW. We have following questions / doubts on RSA7 screen. 1. After executing the delta job in R/3, we can see the records in RSA7. There is one column

  • Export from Folio Producer

    If the Export button in Folio Producer (DPS Dashboard) is ghosted-out...does this mean I have the wrong subscription? Or is it something else? Do you need to be a Pro/Enterprise user to do this?

  • Website tool help - seems like it should be easy

    I'm not exactly new, but it's been a long time since I've used Java. I want to create a page with a list of upcoming events that is sortable by the date as well as the state it's being held in, and I want the events to have unlimited room for descrip