Re-initialize Cursors in Graphs

Hi,
I can't re-initialize cursors in graphs in LabVIEW (I tried in 8.2 and 2010, same issue). I tried to use the "selected Cursor" property, and initialize it with an empty array. When I run it, no more cursors are selected (which is what we expect) but the one that where highlighted when the VI stops running still remain highlighted (which led to confusion, they are not selected but highlighted).
It's probably very basic, but I search for an hour and I'm running out of ideas. If someone could help, I would appreciate.
Solved!
Go to Solution.

Thanks for the quick reply. I tried to re-initialize to default, but it doesn't change the cursor selection. Here is the example. You can try to select a cursor before launching it. Then, when you will launch it, I use the Selected Cursors property to unselected all cursors previously selected. The issue is that the cursor, even unselected is highlighted.
Thanks !!
Benjamin
Attachments:
InitializeCursor.vi ‏13 KB

Similar Messages

  • Fatal Internal Error: "image.cpp", line 13192 when trying to insert a cursor to graph

    NOTE:  This IS a duplicate post from the Breakpoint.  Text slightly changed.  The post in Breakpoint can be deleted.  All comments should be placed in this thread.
    I resolved the "Fatal Internal Error: "image.cpp", line 13192 when trying to insert a cursor to graph", but would like to share to find out if others have seen this and to determine whether this is a bug, or if it's time to redo my PC, or buy a new one..  
    I have an existing graphs (qt 6) which originally had 2 cursors.  This occurred while trying to add the third cursor. 
    Up until attempting to add the last cursor, the program worked great, and I had been running tests for a while.  However, I do recall seeing this problem when creating the original cursors, but not to this extent.  Plus I don't remember the original error message from that time.
    I needed to add one more cursor to the existing graphs.  As soon as I add a new cursor and set it's properties, I get a nasty error message and without warning LV8.2 simply closes itself (well, the only warning was the error message.  Tried it 3 times, same result.
    Here are the steps:
    Shut down the PC, went for a coffee, rebooted the PC.  Opened the LV project, opened the VI.  Immediately went to the graph properties to add the new cursor by doing the following steps: 
    Right click graph indicator icon on block diagram.
    Select Properties.
    Click on cursor tab.
    Click on Add
    Select Cursor 2 (3rd one, newly created)
    Change color
    Select cursor as a line
    Remove checkmark for "show cursor"
    Click OK
    I need to do this to 3 other graphs, same steps.  And as soon as I get to the step before clicking OK, I get the error message. 
    I managed to get an additional one done, by immediately saving after each step (yep going in & out of the properties).  But I've had this problem before when creating the first two cursors.
    Is it a bug?  Anyone else seen this?  Using LV8.2.  And the message is right about LOOSING ALL unsaved work!!!! 
    Here are more observations:
    Tried creating a new one on the second graph.  As soon as I clicked on the color, it crashed!
    See the error explanation below.  It is really clear, now anyone can solve it    LOL!!...  According to the error log, there's a bad image out there  
    .\manager\image.cpp(13192) : DAbort: bad image in ValidateImage
    $Id: //labview/branches/Europa/dev/source/manager/image.cpp#47 $
    0x007A81E8 - LabVIEW <unknown> + 0
    0x007A7BDB - LabVIEW <unknown> + 0
    0x00829D74 - LabVIEW <unknown> + 0
    0x008546CD - LabVIEW <unknown> + 0
    0x00C054E6 - LabVIEW <unknown> + 0
    0x0081B9C8 - LabVIEW <unknown> + 0
    0x0081EB9A - LabVIEW <unknown> + 0
    0x0084D9D4 - LabVIEW <unknown> + 0
    0x00854663 - LabVIEW <unknown> + 0
    0x00C054E6 - LabVIEW <unknown> + 0
    0x0085F7A1 - LabVIEW <unknown> + 0
    0x00BBACDD - LabVIEW <unknown> + 0
    0x00C06A2F - LabVIEW <unknown> + 0
    0x0085AA46 - LabVIEW <unknown> + 0
    0x00C06A2F - LabVIEW <unknown> + 0
    I observed the title bar after making changes to the properties.  I noticed that 3 out of 4 times, while changing the properties of the graphs to include the cursor, and saving after each & every step, that there were no stars appearing on the title bar to indicate "unsaved changes".  Saving was also much slower than usual.  I suspect, the program never got to placing the star before saving occurred.  However, I am noting everything.
    After creating the cursors, saving was and is normal, and the program runs well..   I have run tests without problems.
    Does anyone have a clue at what causes this?   Has anyone seen this before?
    Thanks,
    RayR

    Hi Donovan,
    I can't remember seeing this elsewhere.  When I get a chance, I'll create a new (blank) vi with new graphs and will repeat the steps. 
    I will let you know if I see this in the new vi.
    Thanks!
    RayR

  • Position Cursor on GRAPH either by dragging it OR entering the dsired position in the Cursor legend

    I've written a VI that allows the user to import a dataset, view it on a graph, and then use cursors to "filter" the range of data that I'm interested in, by sending the cursor.index values from the first graph to an array subset function which feeds a second graph.  The problem is that I'd like to provide the user the ability to position the cursors on the first graph both visually - by dragging - (for "course" control) AND by entering the desired values directly into the cursor legend (for fine control).  The problem is that I cannot find a way to do this, since I have to have the Lock Ring set to “Lock to Plot” in order to capture the index information. According to the documentation, the only way to be able to position the cursors via the Cursor legend is to set the Lock Ring to “Free”, which means the index values are rendered useless, since the cursor is no longer locked to the plot.  If I leave the Lock Ring in "Lock to Plot", and enter a value in the cursor legend, it does move the cursor, but not to where it should.  If I enter a value an x value of 9.0 for cursor 1, the cursor goes to 10.2638.  The next time I enter 9.0, it goes to 9.82794.  I don't understand what the issue is.  Is there a way around this?
    Attachments:
    ppv data filter 3.vi ‏366 KB

    Yes Rudi:  What I want is for the operator to place the cursors by dragging them (just eye-balling it).  The, if they see that the Y cursor (horizontal) is at 10.234, and they want to make it 10, they could simply enter that value in the cursor legend, and the cursor would be placed exactly at 10.  The only way to do this seems to be to select the “Free” option for the cursor.  However, in order to use the first graph to set the boundaries of the second graph, I have to use the Cursor Index from the first as an input to the Array Subset that feeds the second graph.  In order to use the Cursor Index, the first graph has to have its cursor Lock Rings set to “Lock to Plot”.  Am I making this any more understandable, or just rambling?

  • Xcontrol Cursor (XY Graph) with cursor release

    I try to build a Xcontrol who give the values of a cursor.  The only data I send to the Xcontrol is the reference of a XY Graph.  It is working fine when using the boolean left  and right (see drawing).  When I try to to utilize the "cursor release event" (in the Xcontrol) it is not working and the cursor freezes, any idea?
    Jean-Marc
    Jean-Marc
    LV2009 and LV2013
    Free PDF Report with iTextSharp
    Attachments:
    Xcontrol image.jpg ‏50 KB
    Curseurs XY.zip ‏97 KB

    Jon S. wrote:
    Hello J-M,
     I think I figured out what was causing the hang in LabVIEW when you moved the cursor.  You need to put an Unregister for Events at the output of your Event Structure in the Facade of your Xcontrol.  After I did this LabVIEW didn't hang.  The values didn't update in your cluster but the hang didn't occur.  You might need to do some more coding the case for "Mouse Up".
    This actually is bad advice.
    What it does is unregister the event refnum every time the VI is run, this means that the event only is registered during execution of the XControl.
    The fact that the FP gets locked means that there is a valid registration that has the 'Lock FP during processing'==True.
    For dynamic events you need to right click on the registration node and deselect that option.
    What might work is setting the timeout of the event node to -1 and not stop the while loop. However I am not sure what happens in these cases.
    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!

  • Change mouse cursor over graph cursor.

    Is there a way to change the mouse cursor as it moves over graph cursors when using trackmode TrackDragCursor? To indicate that you can position the cursor.

    You could accomplish this with the graph's CursorMouseMove event. For example, create a new project with the NI Measurement Studio AppWizard and follow these steps:
    Add a graph to the dialog. Right-click on the graph in the dialog editor, click "Class Wizard ...", click the Member Variables tab and add a member variable for the graph called m_graph. Click OK.
    Right-click on the graph in the dialog editor and click on "Events ...". Add an event handler for CursorMouseMove called OnCursorMouseMove and add an event handler for PlotAreaMouseMove called OnPlotAreaMouseMove. Click OK.
    Go to the header file for your dialog class and add this to the bottom of the class declaration:
    private:
    bool m_cursorChanged;
    HCURSOR m_defaultCursor;
    HCURSOR m_crossCursor;
    Go to the source file for your dialog class and add this to the end of the
    OnInitDialog method:
    m_graph.TrackMode = CNiGraph::TrackAllEvents;
    m_graph.Cursors.Add();
    m_cursorChanged = false;
    m_defaultCursor = ::LoadCursor(NULL, IDC_ARROW);
    m_crossCursor = ::LoadCursor(NULL, IDC_CROSS);
    Add this to your CursorMouseMove event hander:
    if (!m_cursorChanged)
    :etCursor(m_crossCursor);
    m_cursorChanged = false;
    Add this to your PlotAreaMouseMove event handler:
    if (m_cursorChanged)
    :etCursor(m_defaultCursor);
    m_cursorChanged = true;
    Run the application. You should see that the mouse cursor changes to a cross when you mouse over the cursor.
    Hope this helps.
    - Elton

  • 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

  • Automatic Cursor Movement in one Graph, in accordance to the cursor in another graph

    I am using two XY graphs each with 4 cursors. I want to assign each cursor of graph A to each cursor of graph B such that the corresponding cursors in graph B moves in accordance to the cursors in graph A.
     I have used Active cursor, Cursor.PosX and it works for one cursor. However when I use the same concept to change the active cursor value and faciliate the automatic movement for all cursors they do not work.
    Message Edited by Chathuri on 08-13-2009 06:26 AM
    Solved!
    Go to Solution.

    Hi,
    As requested I would like to post the solution as to how I tacked the problem. It was actually small mistake on my part. When I connect the two property nodes for each XY graphs I should connect ActiveCursor to ActiveCursor and Cursor.PosX to Cursor.PosX. What I did was connect the Active cursor of A graph to the cursor.index of B graph. I have attached a small screen shot of connecting the first cursor of A graph to the 1st cursor of B graph so that the cursor in B graph follows the cursor in A graph.
    In order to connect more cursors as in my case, the only change to be made is the change in the Acitve cursor constant to, 1,2,......
    Chathuri
    Attachments:
    CursorMovement.JPG ‏7 KB

  • Moving the cursor in a graph beyond the XY boundaries

    Hi All,
    I have graphs with many plots.
    Suppose one of my plots is  on the topmost portion of the graph.
    The user is able to scroll thsough the graph so that sometimes some of the plots go beyond the visible portion of the graph.
    I want to know how can i limit the graph scrolling beyond the area the plots reside.
    The graph consists of all the plots in the visible area when its loaded.
    But if the user scrolls the graph beyond ther limits some plots go beyond the visible portion.
    What is the solution for this problem?
    Is there any way like lock the graph if the usder scrolls beyond the boundaries?

    Right click the graph and uncheck "Advanced>>Cursors Scroll Graph".
    Try to take over the world!

  • Pda graph redraws every time when cursor is moved

    Hi,
    I use PDA Module 8.2 and Windows Mobile 5 OS on PDA.
    I
    have a problem that every time I move cursor on graph control plot is
    being redrawn, so it realy annoying when you have 5000 or more points
    and you have to wait a second while plot is being redrawn.
    You can test this in attached vi.
    Is there any way to aviod this?
    Thanks,
    andrej
    Attachments:
    test1.vi ‏25 KB

    andrej wrote:
    I need to react user-interaction.
    I will resize data and plot it, but processing will be done on original data.
    OK, that's not just a "cursor move", if the cursor movements causes resizing and processing of the displayed data. Most likely, the processed data looks different so a redraw is needed anyway.
    Reducing the displayed data as suggested by others is certainly a good thing. However, 5000 points are not that many, so maybe you are doing things very inefficiently and wasteful. For example, currently you don't have a small wait inside your loop, so the While loop alone will consume all available CPU, strongly competing with the graph redraw operations for CPU resources.
    Why don't you show us the real code that modifies the display/data when the cursor is moved?
    Also, if the data is manipulated via cursors, it is generally a really bad idea to have the axes set to autoscale.
    LabVIEW Champion . Do more with less code and in less time .

  • Fix axes in intensity graph with cursor

    Hi all,
    I try to use the intensity graph as an xy-input device. The user should be allowed to drag the cursor to enter the value. However, the user can always move the cursor outside the plot area, which causes the corresponding axis to rescale. I want to have strictly fixed upper and lower limits. Is there any way to achieve this? One possible solution would be to reset the min/max values every time the cursor was moved (and coerce the cursor position back into the range). A simpler approach would be appreciated!
    Regards,
    Matthias

    > I try to use the intensity graph as an xy-input device. The user
    > should be allowed to drag the cursor to enter the value. However, the
    > user can always move the cursor outside the plot area, which causes
    > the corresponding axis to rescale. I want to have strictly fixed upper
    > and lower limits. Is there any way to achieve this? One possible
    > solution would be to reset the min/max values every time the cursor
    > was moved (and coerce the cursor position back into the range). A
    > simpler approach would be appreciated!
    >
    You don't say what version of LV you are using, but if it is relatively
    recent, right click on the graph and go to Advanced and uncheck the
    option to have Cursors Scroll Graph. The user can still drag and
    release the cursor und
    er the edge of the graph, but this will not change
    the scales. You can pretty easily filter cursor points that are out of
    range and even write back to the cursor value if you need to. I believe
    that if there is data in the plot and the cursor is set to lock to the
    plot, then it cannot be dragged outside the data either, and that is
    another solution.
    Greg McKaskle

  • Why can't we change anymore the cursors behaviour???

    I am frustrated to see that in LV 8.2 we can't change anymore the behaviour of the cursors in graphs.
    There used to be a selectable option between Free, Snap to point... very usefull!
    Now, we must delete the cursor and create a new one to change its behavour.
    WHY????
    What is the idea behind this change???

    This looks like a property that was removed in LabVIEW 8.0.  I will try to see what justification there was and if there is a better work around.
    Brian R.
    District Sales Manager
    Washington DC
    National Instruments

  • How can I easily make a screen shot of a polar graph?

    Hi everyone,
    I am using the very simple VI I have attached to display points (up to 50000 points) on a polar graph. When the screen moves over to the area where there is the graph, the big number of dots included in the graph makes everything become very very slow. I would like to know if there is an easy way to make a print screen of the graph so that I initialize back the graph to no points (or make it invisible) and just display the print screen shot of the graph.
    I have already used the print screen function (+ cutting off the parts of the picture I don’t want) but this is a bit fastidious to do. Would an already made print screen function exist for this kind of graph?
    Thanks a lot,
    User
    Solved!
    Go to Solution.
    Attachments:
    Forum 29 07 10.vi ‏27 KB
    Forum 29 07 10.doc ‏85 KB

    This example show how to do it in two ways
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)
    Attachments:
    Forum 29 07 10_v2.vi ‏31 KB

  • XY graph as control input device

    I'm trying to use a XY graph as an input device (virtual joystick) that controls a crosshair nad also provides coordinates inside a live video feedback from a webcam in labview 2012 64bit , but I can't get the VI to work properly. I've made the VI for the "virtual joystick" and for the video feedback . I can't figure out how to make the VI for the crosshair.
    Attachments:
    2D AXIS CONTROL BUTTON 1.vi ‏15 KB
    WEBCAM VIDEO CAPTURE subvi.vi ‏45 KB

    To use a cursor of an XY graph as a 2D control, the graph does not need to be a control, it can as well be an indicator.
    It seems using an xy graph is overkill adds a bit too much overhead, because you only use 5% of the xy-graph functionality. You could easily use e.g. a picture indicator. If you would use a picture indicator, you could even draw some stylized background looking like a joystick as a function of mouse position, for example. You would need to keep the "mouse down" state in a shift register, and only react to mouse positions while the button is held down.
    If you want to use a cursor of an xy graph, you should do a few things. For example you should disable "cursors scroll graphs", else the axes will scroll when the cursor is moved past the boundary. Your code also spins the while loop like crazy. All you need is spin the loop when the cursor changes. Use an event structure. Attached is a very simple rewrite of your code. (You still should ensure that the cursors remain coerced to the plot area, not shown).
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    2D AXIS CONTROL BUTTON 1_MOD.vi ‏10 KB

  • MULTIPLE PLOTS IN ONE GRAPH

    Hello All,
    I have some doubt regarding the plotting of graphs.
    I am plotting 8 graphs on one graph.
    I have 8 different X scale and 8 Y scale.
    I have 5 cursors on each of the plot.
    When i move my cursors, I want that they should not move beyond the scale limit.
    For eg: I have all the X scale as 0 to 400 and i dont want my cursor should go beyond the scale.
    I am using an event case and i have set the limit of the scale as a property node outside the event struture. but that makes my graph to flicker.
    Can anyone help me on this?.
    Thanks a lot
    With regards
    Avni

    Have you tried unchecking the Cursors Scroll Graph option? It's under the Advanced options when you right click on the graph.

  • Multiple cursors...

    Hi!
    I have a question that Natinst seems to know very little about. I have
    two graphs. I need to set the x-value of two cursors per graph via my
    program. The y-value is unimportant. How do I do that? I tried what
    seemed to a good idea, the cursor x attribut node but nothing happened.
    Please help!
    Regards
    /Stefan

    > Well, I currently have a 'free' cursor. I then wire 0 to the active plot and
    > then a number, then 1 to the next active plot and then the same number plus an
    > offset into the next cursor x node and I still get only one cursor. I have
    > asked Natinst about this, sent my 'code' and all but they can't seen to
    > understand what I want to do. I didn't receive any answer anyway.
    >
    > Currently I have four nodes. two active cursors and two cursor x's. I wire 0
    > and 1 into active cursor and two variable and different values (sliders) into
    > the cursor x nodes. The first cursor moves just fine according to the slider
    > but the second cursor is not visible. Please help!
    Ah. Well I was also misunderstanding your problem. If you want to progra
    mmatically
    define a new cursor, you need to use the Cursor List. Assuming you want
    to keep the
    current cursors, read the Cursor List, append a new element to it with
    all cursor
    settings however you want them, then write the Cursor List. Active
    Cursor will always
    pin to the currently valid cursors on the graph. It will never create
    new cursors.
    It also sounds like you are breaking the attribute nodes apart. They
    execute from top
    to bottom and can have intermixed reads and writes. This makes it
    easier to sequence
    without introducing sequence structures or race conditions. Just grow
    the node to have
    the number of terminals you need, then popup to select what you need and
    to make it a
    read or a write.
    Greg McKaskle

Maybe you are looking for