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

Similar Messages

  • 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

  • Graph cursor move by keyboard

    I have ComponentWorks 3.01 and VB
    is it possible to move the cursor of a graph
    BY KEYBOARD
    When i use mouse ok, but not keyboard
    Thank you

    There is no direct support for this in the graph. The thing that's tricky about this at the graph level is how would you select the cursor that you want to move if you had multiple cursors in the graph?
    Assuming that you only have one cursor, the code snippet below will move the cursor left and right by one point by pressing the left or right arrow keys. To run this example, create a new project in VB6, add a graph to the form, and then paste this code:
    Private Const NumberOfPoints = 50
    Private Const LeftArrowKeyCode = 37
    Private Const RightArrowKeyCode = 39
    Private Sub CWGraph1_KeyUp(KeyCode As Integer, Shift As Integer)
    If CWGraph1.Cursors.Count > 0 Then
    Dim cursor As CWCursor
    Set cursor = CWGraph1.Cursors.Item(1)
    If KeyCode = LeftArrowKeyCode Then
    If cursor.PointIndex > 0 Then
    cursor.PointIndex = cursor.PointIndex - 1
    End If
    ElseIf KeyCode = RightArrowKeyCode Then
    If cursor.PointIndex < NumberOfPoints - 1 Then
    cursor.PointIndex = cursor.PointIndex + 1
    End If
    End If
    End If
    End Sub
    Private Sub Form_Load()
    PlotSampleData
    InitializeGraphCursor
    End Sub
    Private Sub PlotSampleData()
    Dim data(NumberOfPoints - 1) As Double
    Dim i As Integer
    For i = 0 To NumberOfPoints - 1
    data(i) = Rnd() * 10
    Next
    CWGraph1.PlotY data
    End Sub
    Private Sub InitializeGraphCursor()
    Dim cursor As CWCursor
    Set cursor = CWGraph1.Cursors.Add
    Set cursor.Plot = CWGraph1.Plots.Item(1)
    cursor.PointIndex = CInt(NumberOfPoints / 2)
    cursor.SnapMode = cwCSnapAnchoredToPoint
    End Sub
    Hope this helps in getting you starte
    d.
    - Elton

  • Cursor move event dicrease frequency

    Hello!
    A long time ago I remember I saw a forum post or a community doc, where it was explained how to decrease a certain Event to be triggered too frequently.
    I have a graph with a cursor, and when the user starts to move the cursor, I do some minor calculations and output some values into indicators. I would like to discard some of the "mouse move" events, so when the user pulls the cursor "too fast", I do not overload the CPU with processing. I know I could just use the "cursor release" event, but it is not that nice, the user does not get feedback about the values between the two locations.
    So I cannot really remember what was the trick to discard the too frequent triggering, it involved some time stamp comparison I think...
    Could someone help me out, how to properly solve this task?
    thanks!
    Solved!
    Go to Solution.

    In newer LabVIEW version you can limit the size of the event queue. Try this first. (See this completed idea).
    In earlier version I would compare the current cursor position with the position obtained from a property node and execute an empty case structure unless they are equal. The old discussion is here. (Also make sure to disable "lock front panel until event completes").
    The cursor idea in in this reply, see the right side of the following image.
    LabVIEW Champion . Do more with less code and in less time .

  • Is there any easy way to move the cursor in a plot by just a mouse click?

    Right now I have to click at the cursor and drag it to the right position. I was wondering if there is an easy way to just do the mouse click to change the cursor (not dragging the cursor). I have only one cursor in the graph.

    Assuming that if you click the cursor that you want it to always move to the same position, I think that you could do what you want by calling the cursor's SetPosition method in the graph's CursorMouseDown event.
    - Elton

  • How to prevent middle mouse click to move the cursor but still poaste the clipboard ?

    This is a linux only issue.
    When i'm typing a text editing box, i use the select text/middle click gesture to copy/paste text.
    But the middle click not only paste the selected text but move the cursor at the actual mouse position before.
    I don't want this behavior, because :
    1. I work a lot with vim, where you don't mouve the cursor using the mouse, so i must change my habit when i'm using firefox.
    2. When i middle click, event if i put the mouse in the right place, i might mouve it a bit and the text will be pasted on the wrong place
    I've been looking in the about:config and the only related option is
    middlemouse.paste;
    If i put it to false, the middle click button does not mouve the cursor, nor does it paste.
    Any idea how to achieve that ?

    I do not find the cursor moving on me if I use middle-click to paste text or url that is in that I highlighted into clipboard. Whether I used my Logitech MX510 or the T-CH!!/T-CL13 trackballs that I use now.
    The right-click and copy selection then right-click and paste to paste contents where Caret is method can be more precise though.
    '''FredMcD''', if you have not used Linux then maybe you should not be replying to questions that are Linux specific. Same with Mac OSX.

  • My macbook pro is running very slow with some strange mouse and window movements. The trackpad is very unresponsive and when responding the cursor moves on its own and/or very erratically. When on safari the window suddenly zooms in or highlights words.

    My macbook pro is running very slow with some strange mouse and window movements. The trackpad is very unresponsive and when responding the cursor moves on its own and/or very erratically. When on safari the window suddenly zooms in or highlights words and looks them up via dictionary. I currently have a wireless mouse connected and I am still having the same problems.
    I fee like I may have a virus or my laptop is perhaps being accessed remotely. All of the sharing options are unchecked.
    HELP PLEASE
    Very worried!!

    Try these in order testing your system after each to see if it's back to normal:
    1. a. Resetting your Mac's PRAM and NVRAM
        b. Intel-based Macs: Resetting the System Management Controller (SMC)
    2. Restart the computer in Safe Mode, then restart again, normally. If this doesn't help, then:
         Boot to the Recovery HD: Restart the computer and after the chime press and hold down the
         COMMAND and R keys until the Utilities menu screen appears. Alternatively, restart the computer and
         after the chime press and hold down the OPTION key until the boot manager screen appears.
         Select the Recovery HD and click on the downward pointing arrow button.
    3. Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the Utilities menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu. Select Restart from the Apple menu.
         Reinstall the 10.9.2 update: OS X Mavericks 10.9.2 Update (Combo).
    4. Reinstall Lion/Mountain Lion, Mavericks: Reboot from the Recovery HD. Select Reinstall Lion/Mountain Lion, Mavericks from the Utilities menu, and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.
    Reinstall the 10.9.2 update: OS X Mavericks 10.9.2 Update (Combo).

  • I have a regular usb mouse and it isn't working. It sometimes clicks, but it can't make the cursor move. The red light will not turn on.

    I have been using a mouse with my MacBook Pro for a very very long time now:
    Optical USB Mouse:
      Product ID:    0xc016
      Vendor ID:    0x046d  (Logitech Inc.)
      Version:     3.40
      Speed:    Up to 1.5 Mb/sec
      Manufacturer:    Logitech
      Location ID:    0x06200000 / 3
      Current Available (mA):    500
      Current Required (mA):    100
    I'm running OS 10.6.8 on a MacBookPro that is fairly old.
    The mouse is detected on the USB port, either one, but the red light won't light anymore so I can't use it to move the cursor. I've tried rebooting, I've tried the cammand-option.P.R thing. Still no red light.
    Help?

    Mouse Gas?
    I took both of them to work and both worked fine in a different Mac laptop. I brought home two other mice and they both work here in my home computer. That works, but I wish I knew why the first two don't work at home because the logitec mouse I bought for home has very light action and the center wheel needs only a very light touch. I really really liked it and can't find one like it to replace it with.

  • Why does the mouse cursor move to away from the currrent application without the mouse being moved

    the mouse cursor moves away from the current application without the mouse having been moved - this started with the new version - re-installing Firefox makes the problem go away for a short period - re-installing is not a solution
    == This happened ==
    Every time Firefox opened
    == a few days after installing 3.6.3

    Hello Jim.
    It's probably one of three things:
    #your mouse is getting old (this behavior is common in old optical mouses);
    #you have software that is making your mouse cursor behave unexpectedly (I know of an option in Windows that will automatically move your mouse to windows buttons...);
    #or you may be having a problem with some extension or plugin that is hindering your Firefox's normal behavior. Have you tried disabling all add-ons (just to check), to see if Firefox goes back to normal?

  • Jumping mouse cursor movement with secondary monitor

    Mouse cursor movement is interrrupted or jumps as soon as a secondary monitor is connected to my iMac. Either mouse movement direction is affected. Typically cursor movement stops for about a second while moving mouse further. Then suddenly cusor jumps either forward or backward.
    As soon as secondary monitor is dicsonnected, cursor movement is perfeclty in synch with actual mouse movement.
    I would very much appreciate any hints to solve this issue.
    Thanks
    Ole

    Thanks for your link - read it already yesterday.
    Found after some further search other threads with exactly the same issue - unfortunately not yet solved:
    [Ati 4870 Monitor/Mouse problem|http://discussions.apple.com/thread.jspa?threadID=2130243&start=0&tstar t=0].
    [NEW09 imac External Monitor causes mouse to freeze every 4 sec for half sec |http://discussions.apple.com/thread.jspa?messageID=10832381&#10832381]
    This issue seems to affect various of monitor models.
    My secondary monitor is a Fujuistu Siemens model H19-1, resolution 1280 x 1024 @ 60 Hz, 32-Bit Colors connected via

  • How to avoid built-up for "cursor move" events?

    I have a rather complicated program where several graphs need to be interactively updated according to cursors using "cursor move" events. The problem is that the recalculation is relatively slow and the behavior is less than satisfactory. Since the cursor position needs to be "tweaked" until the result is as desired, I cannot recalculate only at the "Cursor Release" event.
    Lock front panel=enabled makes cursor movements tedious because the cursor movements is very
    jumpy and non-interactive. Not user friendly!
    Lock front panel=disabled queues up way too many move events and once the cursor is released
    the graph continues to jump and recalculate for ages.
    The attached demo (LabVIEW 8.20) shows one solution attempt that actually works pretty well: Skip the recalculation unless the cursor position from the event terminal is equal to the cursor position of the graph property node. This basically races through all unecessary intermediary recalculations on stale positions. However, the code can get complicated very quickly if there are multiple cursors.
    In my opinion, cursor move events should not get queued up! The event buffer should hold only exactly one entry:
    the most recent cursor position for each cursor. Can anyone think of a scenario where the extra cursor position trail is useful? The positions are pretty random anyway, right?
    Does anyone have other (better!) ideas how to work around this problem? I definitely want to keep it simple and not throw lots of code at it.
    The attached demo contains more details. It demonstrates the problem if "selective updates" is checked. If unchecked, it implements the above mentioned workaround.
    LabVIEW Champion . Do more with less code and in less time .
    Solved!
    Go to Solution.
    Attachments:
    CursorDelay.vi ‏29 KB

    Thanks for the example.
    The more I think about this, I strongly prefer my original method. It uses minimal code compare to the other solutions offered here. As a demo, I am attaching an implementation to a slide control.
    Fo those without LabVIEW 8.20.
    All slide events have "lock front panel" disabled.
    TIme delay is 500ms, simulating some complex calculation.
    As you can see, it works extremely well:
    NO shift registers, extra loops, queues, tuning parameters (min times, etc.), etc.etc.
    Just a deceptively simple "equal" followed by a case structure.
    The demo shows a typical recording if I quicky move the slide up and down, then release it. You can see that the raw event structure takes more than 40 seconds to stabilize while my selective solution follows the slider position almost perfectly despite the 500ms stall in each update.
    See for yourself! Can anyone think of a drawback of this method? Even if the slide terminal is not in the same loop, a comparison of a local variable with the newval should do the trick just fine.
    Message Edited by altenbach on 09-28-2006 12:43 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    SLIDEDelay.vi ‏26 KB
    SlideUpdate.png ‏21 KB

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

  • How can I correct Unstable, erratic mouse cursor movement

    I currently have a dual boot setup with Windows 7 Pro 64 and XUbuntu 64 bit XFCE desktop. On random occasions, the mouse pointer will begin to float and or will not stay positioned on the spot selected.  This occurs with or without an external mouse attached.  The track pointer will not control the mouse and neither the left nor right keys just below the keyboard function.  The drifting will stop sometimes when the center key at the bottom of the keyboard is pressed. The touchpad and its keys seem to work correctly.  I have turned off both of these in the BIOS and have not had any problems.  It seems to me that the problem may be with the keyboard. Any body have any experience with this sort of problem?  

    Hi
    Thanks for your post
    To  help you further on this issue please share more details
    1. erratic mouse cursor movement  is happening  in win 7 or ubuntu
    2.  please share the touchpad driver version   &  bios version
    Cheers!!!

  • Mouse moves both cursor AND screen

    This is something new, and it just started a few minutes ago for no reason that I can see. It's simply that when I move my mouse, the whole screen moves. The cursor moves as it should, but the screen moves in the opposite direction from the cursor. I can still manage to operate the computer, but it is much more difficult to do so.

    Niel wrote:
    Open the Universal Access pane of System Preferences, click on the Seeing tab, and turn off Zoom.
    (35688)
    That did it. Thanks.

  • My cursor moves arbitrarily. The mouse no longer controls it. It's a macBook Pro.

    my cursor moves arbitrarily. The mouse does not control it except minimally or from time to time.

    There are several possible causes for this issue. Please take each of the following steps that you haven't already tried until it's resolved. Some may not apply in your case.
    1. Follow the instructions in this support article, and also this one, if applicable. A damaged or defective AC adapter could be the cause, even if it's the right kind.
    2. Press down all four corners of the trackpad at once and release. If there's any effect, it's likely to be temporary, and in that case the unit must be serviced or replaced.
    3. Open the Bluetooth preference pane in System Preferences and delete all pointing devices other than the trackpad, if applicable. Disconnect any USB pointing devices. By a "pointing device," I mean a peripheral that moves the cursor, such as a trackpad, mouse, trackball, or graphics tablet. A plain keyboard is not a pointing device.
    4. Start up in safe mode and test, preferably without launching any third-party applications. If you don't have the problem in safe mode, but it comes back when you restart as usual, stop here and post your results. Do the same if you can't start in safe mode. If there was no difference in safe mode, go on to the next step.
    5. Reset the System Management Controller.
    6. If you're using a Bluetooth trackpad or mouse, investigate potential sources of interference, including USB 3 devices.
    7. A swollen battery in a portable computer can impinge on the trackpad from below and cause erratic behavior. If you have trouble clicking the trackpad, this is likely the reason. The battery must be replaced without delay.
    8. There's a report that a (possibly defective) Thunderbolt Ethernet adapter can cause the built-in trackpad of a MacBook to behave erratically. If you're using such an adapter, disconnect it and test.
    9. There's also a report of erratic cursor movements caused by an external display that was connected but not turned on.
    10. If none of the above applies, or if you have another reason to think that your computer is being remotely controlled, remove it from the network by turning off Wi-Fi (or your Wi-Fi access point), disconnecting from a Bluetooth network link, and unplugging the Ethernet cable or USB modem, whichever is applicable. If the cursor movements stop at once, you should suspect an intrusion.
    11. Make a "Genius" appointment at an Apple Store to have the machine and/or external trackpad tested.

Maybe you are looking for

  • Adobe Bridge gives a system error

    Adobe CS4. Installed on my mac. Does not recognize Raw files and when i try to open Bridge says a system error has occured. Adobe Photoshop Version: 11.0 Operating System: Mac OS 10.9.0 Camera Raw 5.0 Please help

  • Birthday Calendar Glitch

    After I switched over to iCloud my Birthday Calendar has gone a little haywire. On each day there is a Birthday it has 3 birthday events. Two of them just say "Birthday" while the third says whose birthday it actually is. When I go to my address book

  • BUG: Perforce Plugin having problems on JDev 10.1.3.0.4 (SU4) on Mac OS X

    I've downloaded the Perforce plugin, and try to connect to the Perforce server here. When I click Versioning > Connect to Perforce... first it takes a long time for the dialog box to open, next I fill in: - username - password - leave remember passwo

  • Cost center assignment based on material master

    Hi Experts: My client wants cost center assignment to be based on material master, for example, SAP system should be configured in a way that when costs arise due to a product price variance, then SAP should automatically post to the cost center for

  • Unable to stop agent / start agent!!!

    Hi one of the process emagent is running. Even when I issue command kill -i PID. that is not getting killed. oracle 3309 1 0 Mar 30 ? 8:49 /opt/oracle/dbms/agent10g/bin/emagent kill -9 3309 # no use :( When I try to stop. start and status of emctl th