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

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

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

  • 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

  • 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

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

  • Restrict the movement of cursors on xy graph

    hello.
    I have an XY graph, with values of 0-10 in X, and of 0-10 in Y. I have two cursors in the graph.
    I do not want the cursor is out of the graph area of 10 * 10, I disabled the auto scale, but the cursor can get out of the area of 10 * 10.
    I also hope that the value of X of the cursor0 does not exceed the value of X of the cursor1.
    I hope you can help me with these restrictions on movement, thank you very much.

    Hey there, If you want to restrict the value of the cursors you can use property nodes to do so..
    Here is an example; you just need to get the value on X of the active cursor (0 or 1) and then compare those values; if the value is smaller; you can use a case structure and a property node to coerce the values.
    Hope this info helps.
    Greetings
    Attachments:
    Untitled 3.vi ‏11 KB

  • Event Precedence - Mouse Move or Cursor Move on Graph?

    Since LabVIEW 8+ introduced cursor events (grab, move, release), is there a conflict that would occur between a mouse move event and cursor move event since a cursor move involves a mouse move?  Or, since the cursor move requires the left mouse button to be down, does that allow LabVIEW to differentiate which event is occurring?  I have some code I am writing to draw a box on an intensity graph (using the new plot.images property for graphs) so as to extract a region of interest.  At first, I want a cursor to follow the mouse as it moves over the graph.  Then, I want to draw the box region when I grab the cursor (with left mouse key down) and drag it.  Differentiation of these two event types will allow me to unambiguously accomplish this task.
    Thanks,
    Don

    Moving a cursor will interleave mouse move and cursor move events.
    However, you can easily keep state of mouse up/down to distinguish what to do in this particular case. See attached draft (8.20).
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    eventqueue1.vi ‏29 KB

  • How to determine the coordinate (intensity graph)

    Hallo all,
    is there a tool in labview, which enables me to determine the coordinates of a point in an intensity Graph? i mean, is it possible to determine these coordinates just by clicking on the desired point?
    thanks

    See the following code.
    Ton
    Message Edited by TonP on 09-25-2008 03:56 PM
    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:
    GetCoords.png ‏6 KB

  • Is there any way to enlarge a cursor on a graph, or attach a .bmp image to it so that it shows up better?

    I am using an intensity graph to display position (and information) from GPS, using the graph's cursor, point only without crosshairs, to indicate the location. Sometimes it is hard to find the cursor. I would like to enlarge it, make it flash, attached an led indicator, bitmap image or something to make its location more obvious against the background data. I've thought about attaching the LED indicator, but cursor position would need to be calibrated to the screen aspect ratio. This works, but its difficult given that the graph has varying Scales. Does anyone know an easy way to make the cursor larger or more obvious using any of the methods mentioned above?

    I came up with this solution but I now do not think it is what you are looking for now that I reread your posting. My example reponds to mouse clicks from the user on the intensity graph and it moves a highly customized picture control to where you mouse up. You can learn how to modify controls in the "LabVIEW� Custom Controls, Indicators,and Type Definitions" manual.
    I think what you want instead is to programatically move the cursor and have an image move to the new location. I could not figure out how to do this reliably. The problem is that the cursor location is given relative to the data and there is no property that gives the postion relative to the screen. I have in the past come up with fancy algorithms for making this conversion but all my s
    olutions were flaky--they did not work right when the VI as loaded from file.
    Attached you will find my example. The logic for controlling the picture control movements is not finished but it gives you an idea of what you might expect with this method.
    Attachments:
    custom_cursor.llb ‏42 KB

  • Creating intensity graph from ywo sets of data?

    Hi,
    In my vi, I am getting two data set dependent on each other, i.e. amplitude(y) versus position(x). The data acquisition of x-y data happens in a for loop. This data is transferred outside the loop with index enabled. Outside the loop I want to plot an intensity graph out of these data, while z=amplitude, x=position,y=not important, say index. I don't want simply to transfer the amplitude data outside the loop and connect the 2D array of amplitude to the intensity graph. I want to preserve the position information in the intensity graph. How can I do this?
    Thanks

    Here is a link to a posting that may have been yours also. Just some ideas I had. I hope it can help you get started somewhere.
    J.R. Allen

  • Why can't I programmatically align a picture to a graph?

    Labview 7.0; Mac or PC
    OK, so it sounds like a simple problem, right:
    - bottom line: I want a graphical plane (picture with transparent
    background) overlaid on an intensity vs XY data set (Intensity graph).
    And I want the two image planes to overlay properly, so I want to do
    the alignment programmatically (draw/plot areas of picture and
    intensity graphs to be the same size and in the same location).
    Here is the problem that I run into:
    - summary: Some of the (important) property node positional and size
    attributes of the intensity graph return strange values that therefore
    can not be used as input to positional properties of the picture.
    OK, more specifically, what I tried and saw:
    - create a picure, of any size, on a front panel. Make the background transparent, and make the label not-visible
    - create an intensity graph, of any size, on a front panel. Make the label not-visible.
    - make a property node for the intensity graph and another one for the picture
    - set the draw area of the picture = plot area of the intensity graph.
    OK, that was easy, and works fine (you can manually align the two to
    see that this works, but then mis-align the two to continue)
    - note that there is no property to identify the origin of the plot area of the intensity graph directly.
    - Hmmmm, maybe the scale marker bounds on the graph can be used to
    (somewhat closely,but maybe not exactly) identify the origin of plot
    area of the graph...
    - set the position>left property of the picture = X scale>marker>position>left
    - set the position>top property of the picture = Y scale>marker>position>top
    - IT WON"T BE ANYWHERE even close (the alignment is way off)
    It gets better:
    - on the front panel, move the graph up maybe 50 pixels, and to the right about 50 pixels
    - run the vi again and see that the picture moves to the right as expected, but has not moved up at all
    There's more, but I don't want to complicate the picture any more. I'll
    just summarize by saying that it appears that some of the intensity
    graph-components position/size properties change in value based on the
    number or types of properties requested.
    I haven't tried aligning the graph to the picture instead, but I'm
    guessing that I'm missing something stupidly simple in this example,
    and someone can help to restore my sanity.
    Thanks, in advance

    altenbach,
    Thanks for the reply. Sorry, I didn't realize how easy it is to attach
    a vi. OK, attached is the simple vi. I made the vi even simpler... it
    matches my text more exactly. Interestingly, the result is a little
    different: now, if you move the graph and rerun the picture moves
    accordingly... but still, the picture is not positioned as I'd expect.
    Also, thanks for note about scale changes (and associated plot area
    size changes)... I had thought of that, but hadn't figured out yet if
    it was going to be an issue for my application; and if so, how I'd deal
    with it.
    I'm not quite ready to upgrade all the existing code to Labview 8 -
    much of the code is fielded to customers so there is a business aspect
    to work out. But, I'm looking forward to starting to experiment with
    Labview 8.
    I'm not sure I appreciated your "image indicator" idea. Maybe you mean
    use either a picture for both graph and picture; or use graph for both
    graph and picture. This is not a bad idea based on other aspects of the
    application that I ran into. I wanted a picture to make use of the draw
    tools. But, I need to draw ovals and rectangles; rotate and pan them
    individually and as a group. I found that I had to build the oval and
    rectangle shapes (out of line segments) my self in order to get the
    rotation function. So, if I'm just using line segments (that I define)
    to build arbitrarily rotated ovals and rectangles, I could use an XY
    graph and get zoom and pan for free (so to speak).
    Thanks
    Attachments:
    overlay position test.vi ‏21 KB

  • Profile from an Intensity Graph?

    Is there a VI to extract a "line profile" from an "Intensity Graph"?
    Hopefuly, the profile could be specified using the mouse.
    Thanks for any clue...
    Alfred A. Manuel, Dep. of Physics, Univ. of Geneva, 24 quai E.Ansermet
    CH-1211 Geneva 4, Switzerland. Phone: +41-22-702.6293 or 6397 or 6224,
    +41-22-771.1062 (home). Fax: +41-22-321.5606 or +41-22-702.6869
    http://sc2a.unige.ch/~manuel/main.htm [email protected]

    An intensity graph is just a 2D array. Simply slice out a column or row as desired.
    The attached example (LabVIEW 7.0)  lets you graph the slice under the cursor on a waveform graph. It should get you some ideas.
    Message Edited by altenbach on 01-09-2006 02:33 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    IntensitySlice.vi ‏45 KB

  • Scaling intensity graph Z-ramp with panel - how?

    In LV7.1.1 is there any way to get the color ramp associated with an intensity graph to scale with changes in the VI panel size?
    I've tried telling VI to scale the intensity graph indicator with the panel and that didn't work nor did telling it to scale all front-panel objects with the panel. The ramp always retains its original size.

    I think you are stuck.
    As for most of the controls, there is no way to change the size programmatically.
    The only thing you could do as work around is to create a picture control (which size can be changed...) to mimick the graph scale...
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

Maybe you are looking for

  • Mobile output error in HTML vs BC export, HELP!?

    When I view the site on Business Catalyst the mobile site views properly but when I export it as an HTML and upload it to a different server not hosted in BC it shows differently, HELP! Thanks! See images below for reference... I have also viewed it

  • IPod Nano will not sync.

    I have the new 8GB iPod Nano, and when I first installed iTunes and plugged in my iPod, it synced perfectly (I had songs from an earlier iTunes for when I had my Shuffle). Now when I try to sync, it doesn't work. I press try, then iTunes freezes for

  • Overlapping issues in Acrobat Pro 8

    One of my users is using Acrobat Pro 8. He has been converting webages to .pdf without issue for a week or so. No changes were done to the PC, do changes were done to defaults. He's using the same webpage and the same procedure he has been using but

  • Power cord not fitting into charge port

    I have a 15-n030us.  The power card has started not fitting snugly into the power port, and the charging is going on and off since it isn't tight.  I didn't do anything to it I know off, or push it in whenit wouldn't go in, wtc, it just sudddenly won

  • What JVM do you use?  What is the best choice?

    We may be rolling forward Discoverer 10.1.2 sometime in the near future. The current release uses Sun J2RE 1.4.2-06. There is a J2RE 1.4.2-09 available, as well as JRE 5.0 Update 5. Deploying JVMs is a pain when potentially hundreds of PCs are involv