Programmin​g intensity graph cursor to move automatica​lly

Hi Everyone!
I want to program the 2 cursors(horizontal and vertical) in the intensity graph(Bright spot.png) to move to the bright spot in the middle of the intensity graph(live video feed from a CCD camera) automatically without dragging the cursor manually to the bright spot, is it possible?
I've attached part of my block diagram which involves the graph but i'm unable to attach the whole VI because it has some hardware dll in it.(you guys can ignore the formula part of the block diagram, it's not important)
Attachments:
Bright spot.png ‏118 KB
block diagram.png ‏45 KB

Use "Array Max&Min" to find the peak coordinates, translate them to x and y values, and change your cursor position property node to write and write these values.
I am actually not sure why you have two cursors. A single cursor with a horizontal and vertical line seems sufficient.
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • How can I stop the cursor from being dragged outside the bounds of an intensity graph in LV 7.1?

    Currently, an intensity graph cursor can be dragged outside the graph bounds, and the cursor position continues to change as if the graph had no bounds.

    You can maintain the cursor (and the graph scales...) between defined boundaries programmatically, using an attribute node. Not a very elegant solution, since there is some quivering. See the example.vi.
    Of course, if the user need to modify the scales (zoom in/out...), there will be some additional work ! :-)
    Hope this help.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Bound_cursor.vi ‏51 KB

  • Programmatically disabling/enabling cursor in intensity graph

    Hello all,
    I am building a LV interface (LV2011) for a stepper XY stage.  The system "scans" a surface, displaying it on the graph.  I set up to cursors to zoom into a region of interest (ROI).  Pressing a button resizes the scales to the ROI (zooming in on the area).  Sections of code move the XY stage, and read a device.  When done I want to zoom into a ROI and use a THIRD cursor to manually move the XY stage.  I have this working with TWO graphs, based on the "region of interest.vi" I found in the dev zone.  
    What I would like to do is have a boolean toggle controlling ONE GRAPH between setting min/max (cursors 0 and 1) and manual stepper position (cursor 2).  If cursor 2 is visible I want cursors 0 & 1 not showing and visa versa. Can I do this?
    I attached the example - bascially what I did was add a cursor to the 2nd graph, grabbing the XY vales and sending to the stepper controllers. Works great!  I am trying to "combine the two" by resizing the orig graph with a button click (works fine) and then click another button to show the XY stage cursor (and hiding the min/max cursors) - thats the brick wall
    On a seond note - controlling a XY stage using the intensity graph's cursor is really nice; however it would be great if I can control the cursor similar to a slider's "coerce" - has anyone done this?  I assume I have to write a routine in the event that performs some modulo function. Just curious!
    Thanks,
    Steve
    Solved!
    Go to Solution.
    Attachments:
    roi.llb ‏40 KB

    Your exmaple works perfect. Howver I am having probs with Val(sngl) on the XY graph.  On the example you gave, lets say I move the cursor with the mouse - event fires, everyone is happy. If I move the cursor with CODE - nada.  I even read the "Value" of the graph and wrote it to "Val(sngl)" to try to fire the event.  How does one force a trigger on an XY chart when you move a cursor (say cursor idx2) using code?
    Better yet - why when I read the Val and write to Val(sngl) does the event not fire??? I have been searching for a basic XY table with sensor -type project but havent found one yet.  Everyting works great - draginng the cursor moves the XY stage. Now I need to do the auto-scan part  Use code to place the cursor - trigger the even that moves the stage.
    Thanks
    Steve
    Attachments:
    XY_Stage_Rev8.vi ‏53 KB

  • 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

  • Intensity graph Z cursor value

    Greetings!
    I am creating a scanning XY stage program using an intensity graph.  I have a cursor to drag around that moves the XY stepper motor stages; zooms, adjusts Z colors & "contrast", etc.  I have the data showing up fine.
    However I can't figure out how to get the Z value (so I don't have to show the big cursor legend).  As you know in the cursor legend as you move a cursor the X Y and Z values are shown.
    Can't find a property node for the Z value...  This must be simple 
    Thanks!
    Steve
    Solved!
    Go to Solution.

    Unless you use custom axis offsets and increments, it is just the value of the 2D array and the indices of the cursor positions, so index array should get what you want. If you use custom axis scaling, you need to apply the linear transform between cursor x, y values and corresponding array indices.
    In a better world, the cursor index property should give both indices of the 2D array and the method would directly work also for cases where the axis scaling is custom. This is the reason for my old idea here, so please vote for it!
    LabVIEW Champion . Do more with less code and in less time .

  • Programmatically fire graph cursor move event

    Is it possible to programmatically fire the Graph Cursor Move Event ?  Assigning a value to the Cursor Index or Cursor Position property node does not seem to do it.
    Solved!
    Go to Solution.

    The graph cursor move event contains processing code for data on the graph along with front panel display of those results.  Data is put onto the graph during data acquisition which occurs in another event.  When that data acquisition event finishes I need to cause the processing code to execute once to update the front panel display so its results are shown for the new acquired data.
    I could put the processing code into a different event that fires on say a button value change.  Then the graph cursor move event would fire that button event change by setting its value change property.  The data acquisition event could also fire that button event.

  • Cursor Misalignme​nt in Intensity Graph (LV6.1)

    Howdy.
    I have an Intensity Graph, with a 2D array of data (about 300x300) and a cursor. The cursor is locked to the plot, which for intensity graphs, means that the cursor is drawn at the lower left corner of the pixel that is being addressed.
    Most of the time this works fine. However, sometimes, the cursor is drawn as being located at one pixel, but the values reported for the cursor are in fact a neighbor (usually the one to the right). The zoom level of the graph is such that a given pixel is larger than a screen pixel (about 3-5 times), so I wouldn't think that it was an aliasing problem, but the problem does go away if I zoom in a little further.
    Has anyone else seen this? Does anyone have a fix?

    I don't have a repeatable set of conditions that lead to this problem, so I don't have a demo vi that exhibits it.
    As to unlocking the cursor, I think that in an intensity plot that is more confusing; the location and value reported for a cursor position are shifted half a pixel down and half left with respect to the way the plot is filled in. In other words, say we have a 10x10 plot shown in 100x100 pixel window. Each intensity value is 10 pixels wide. The axis values line up on the boundaries of these pixels. When the cursor is within half a unit (5 pixels) of the crossing point of these axes, that is, near the intersection of boundaries of four adjacent pixels, the value reported is the pixel location and value in the upper right of these four pixels. This means that with an unlocked cursor, I can be positioning it over (visually) the lower left pixel, but selecting the upper right. In fact 3/4 of any given pixel's visual representation is actually going to select some other pixel. So I've locked the cursor to remove that uncertainty; now it is supposed to be always in the lower left corner of the pixel selected.

  • Cursor/Window for Zooming in Intensity Graph

    Does anybody know how to create a non-rectangular window (any shape
    connected by mouse clicks) for zooming (or for data retrieval) if a
    particular area in the graph is of interest in a intensity graph?
    Wouldn't it be really cool if we can select edges in a graph and
    retrieve the information (or data) from the graph?
    The other question of mine is: is there a way that when we're using
    intensity graphs, we can create the custom menu with right mouse button
    click, instead of the standard set of menu items? Any help is greatly
    appreciated. Thanks.
    Sent via Deja.com http://www.deja.com/
    Before you buy.

    [email protected] wrote:
    > Does anybody know how to create a non-rectangular window (any shape
    > connected by mouse clicks) for zooming (or for data retrieval) if a
    > particular area in the graph is of interest in a intensity graph?
    > Wouldn't it be really cool if we can select edges in a graph and
    > retrieve the information (or data) from the graph?
    In my pre-NI days, I had a lot of fun trying to coax image-manipulation and
    -analysis behavior out of LabVIEW intensity graphs. You can do a fair
    amount by making use of cursors and hotkeys and creating pseudo-overlays by
    setting image coordinates to certain colors to create visual cues in
    response to user inputs.
    That being said, I never considered trying to get complex ROI (region of
    interest) info from a user wi
    th an intensity graph, and I'll bet it's a
    pretty tough GUI trick unless you're using IMAQ Vision. If you find
    yourself trying to build features like this into your application, or doing
    a lot of image manipulation in general, you might save yourself time in the
    long run by getting the IMAQ Vision toolkit from NI.
    > The other question of mine is: is there a way that when we're using
    > intensity graphs, we can create the custom menu with right mouse button
    > click, instead of the standard set of menu items? Any help is greatly
    > appreciated. Thanks.
    I'm not aware of a way to suppress the built-in context-sensitive popup
    menus. Sorry!
    Regards,
    John Lum
    National Instruments

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

  • Is this a bug in the intensity map cursor?

    I'm using LabVIEW 7.1 on Windows 2000. When I pan an intensity graph, it jumps around. If there is a curosr over the map, the cursor does not jump with the map and can lead to the cursor reading from the wrong pixel. I've attached a vi that demonstrates my problem. Is this a known bug?
    Attachments:
    buggy-cursor.vi ‏707 KB

    Excellent work on the example VI! This is not a documented bug to date, but I was able to reproduce the unexpected behavior you were talking about. I will pass your example on to our R&D department to investigate and to take corrective action if necessary. Thank you so much for your feedback and hard work.
    Eric Sulzer
    Applications Engineer
    National Instruments
    http://www.ni.com/ask
    E. Sulzer
    Applications Engineer
    National Instruments

  • XY Graph cursor Error

    Hello
    This error was found, when I started using LabView 8, with my old LabView 6.1 VI's.
    I have encountered a minor error on my Graph display. I noticed my Y-Scale numbers go negative, if I Press and Hold my Graph cursor, while I am moving it.
    I run this same test using New LV 8 XY Graph and numbers do not go negative, but they surely flicker a lot + numbers still change some.
    Have you noticed this before? Is there some new property I need to set up, to make my LabView 6.1 Graph stable? Is this known bug or am I just doing something wrong?
    Here is VI for your testing. My LabView 8 version is 8.0.0.4005.
    Just run it and while moving yellow cursor (press+hold+move), after 1-2 seconds of holding something happens.
    Yours
                                         Kari
    Attachments:
    Cursor Test.vi ‏84 KB

    Hello Karik.
    I experience the exact same problem in the application I'm programming.
    The only solution I have come up with is having the cursors Y-axis
    centered in the visible area of the graph.
    However this is really bad because there is will create a smal "hole"
    in the cursor bar, it looks awfull. I think this is a bug in lv8 since
    in lv7.1 I could tie down the y-axis to like -10000 or something and
    the problem would not appear.
    Hope NI fixes this problem really really soon.
    //Andreas

  • XY Graph Cursor Problem in Labview 7.1.1?

    Hallo,
    I am  using Labview 7.1.1 and I am facing one problem with XY graph cursor. If I am moving cursor in one graph, I am expecting same movement in another Graph. But when I move cursor in Graph1, cursor in second graph moves but not to exact X value of Graph1.
    Property of Cursor in both graphs must be "Lock to Plot"
    If any body knows about this please let me know ASAP. I am attaching example VI for your reference.
    Thanks,
    Sashi
    Attachments:
    XY Graph Cursor Problem.vi ‏101 KB

    It's a curious effect. Probably the floating point coordinate is sensitive to the exact pixel alignment (I mean that this would not happen if we had for example 1 pixel per point in the X direction).
    Anyway, if you use Cursor Index instead (which is an integer) the behaviour is as expected.
    Paolo
    Paolo
    LV 7.0, 7.1, 8.0.1, 2011

  • Qucik Graph Cursor Legend Questions

    Hi all,
    I have a couple of quick questions regarding my graph cursor legend:
    1. Is it possible to move the position of the cursor legend during runtime? I cannot seem to drag it around the graph?
    2. Can I hide/remove the cursor mover? This is not needed and is for this vi as I need to be able to manually drag the cursors only.
    I am accessing the cursor legend during runtime through a right-click and selecting "visable items:.
    Thanks,
    Jack

    Hi please check Using Cursor Legend in this link if it is helpful
    http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/customizing_graphs_and_charts/
    Sorry i don't know exact answer for questions, But did you try property node of Cursor.
    -To access it, right click the graph indicator in Black Diagram and go to create>>Property Node>>Cursor.
    -Lot of options regarding cursor available there, you can make selected property to write or change the parameter. and check this for help on cursor properties
    http://zone.ni.com/reference/en-XX/help/371361J-01/lvprop/cursor_p/
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13

  • Unknown graph cursor tool

    I'm hoping someone can identify a graph "tool" that's interfering with my LabVIEW program.  It's not on the normal graph palette and I can't find reference to it anywhere.  It activates seemingly on its own during runtime, and sticks around if I abort execution (its behavior appears to be coded into the graph itself).  I wasn't able to take a good screenshot of what the pointer looks like when the tool is active, so I've included a scaled-up drawing below (pointer is the black/white parts).
    Some additional details:
    - It usually activates when the mouse point hovers over one of the cursors on my XY graph (but only under certain conditions that are not 100% reproducible).  The graph cursors are free dragging, and the tool has only activated when I had more than 1 plot on the XY graph.
    - If I click on a graph cursor when this tool is active and drag in either the +/- Y direction, the Y scale min/max values change to seemingly random values and the Y scale begins scrolling up.  Nothing happens if I move the cursor in purely the +/- X direction.
    Much thanks in advance.

    Okay, I've been able to reproduce the problem consistently in a much simpler VI (attached).  It only contains is a single XY graph, with no code on the block diagram.  There's some data saved on the graph, and I put a bunch of cursors on it.  When I follow the steps below, I've been able to reproduce the issue 100% of the time.
    I should note that I'm using LabVIEW 2014 Professional (64 bit) on Windows 7.
    Attachments:
    Test.vi ‏118 KB

  • 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

Maybe you are looking for

  • PO issue

    Hi everyone,                 I have a issue regarding PO's Iam trying to look at ZC type PO’s. I want to see all of the open PO’s and their validity date range .Currently to view the open PO’s Iam using ME80FN is there any other report which i can us

  • Devices Icon not showing up

    I can't get the device icon to show up on the left bar. Even after I plug in SanDisk Sansa. I removed and reloaded the whole program. I went through the process of removing the library files to desktop and then reopening and bringing files back in. N

  • QUICK TIME VERS 10 - WHAT AM I DOING WRONG?

    Please help -whats gone wrong???? I-Photo videos worked perfectly using Leopard with Quicktime 7 I loaded snow leopard which has quicktime vers. 10 and the videos of grandkids donot work at all - the picture is there but no video action Whats wrong a

  • I get more and more Illustrator files from customers with gradients that are messed up, the files are cut in a lot of square and mask

    What do they do wrong so I can instruct them?

  • External HD ? re:iTunes

    Hi, I just picked up an AEn (the newest router). I would like to hook up a Maxtor external HD that I have loaded with iTunes music that was running off of a Dell. 1. Can I hookup this drive to the AEn and run iTunes for a macbook off of it? 2. If I c