LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

xy graph value during click (very simple)

Dear all,

 I am working on a program to detect mouse movement trajectories, so I am trying to use a xy graph to plot the "movement clue - A target" and then use  event structure to find out movement trajectories.
 I am facing a couple questions. I need to be able to display the movement clue in a exact position on the screen, so I have to know the x and y scale (value/pixel). I plan to ask the subject to do a click on the left upper concern and the bottom right concern of the full screen size xy graph to calibrate the useful area of the experiment. I have no problem to get the coordinates out, but I am facing a problem which is not able to get the corresponding values in the xy graph during the calibration.
 The vi has been attached, could you please give me some suggestion how to handle this simple problem

thanks

Marco

====================
=Labview 7.0 & 8.0 & 8.5=
=====================
0 Kudos
Message 1 of 12
(3,795 Views)
One thing you'll want to avoid is having two event structures with the same event.  In sequence frame 0 you have a mouse down event on the XY graph, and you have it again in frame 1 of the sequence.
 
You are going to have some serious problems where events will get queued up for the other event structure when you don't want them to.
0 Kudos
Message 2 of 12
(3,783 Views)
I try to modify the method of my experiment.
I am trying to see the possibilty to ask the subject to click on a preset cursor on the xy graph, so I will know the xy graph cursor position and pixel coordinate of the mouse cursor. I am trying to use a property node to control a xygraph cursor. However, there is error coming out. Do you have any idea why the property node not work in this way? a new version of my VI have been attached
thanks


====================
=Labview 7.0 & 8.0 & 8.5=
=====================
0 Kudos
Message 3 of 12
(3,774 Views)

What error are you getting?  Please post the error code number.

I can't run your VI because the sub-Vi's are missing.  Also, you haven't made any changes with regards to the duplicated event.

0 Kudos
Message 4 of 12
(3,769 Views)
Sorry! I have not used Labview for a long time. I forgot to post the subVI
I have also attached the error as a picture
thanks
====================
=Labview 7.0 & 8.0 & 8.5=
=====================
Download All
0 Kudos
Message 5 of 12
(3,767 Views)

Move the 0 and active cursor property to the top of the list.

The property nodes execute from top to bottom.  What is happening is that the cursor.posx is getting written to first, but no active cursor has been designated yet.

You may have to insert a cursor on the XY graph first.  I'm not sure.  If the above doesn't work, manually add a cursor to the XY graph and try agiain.

0 Kudos
Message 6 of 12
(3,759 Views)
You are right, I have to manually put a cursor on the graph first
thanks
====================
=Labview 7.0 & 8.0 & 8.5=
=====================
0 Kudos
Message 7 of 12
(3,754 Views)
You are right ! I am getting trouble now! (refer to your 1st reply)
How to do the following?
step1: record a point location when mouse click
step2: record another point location when the mouse click again
step3: record the trajectory of the cursor
Smiley Surprised
thanks


Message Edited by zmarcoz on 02-11-2008 01:11 PM
====================
=Labview 7.0 & 8.0 & 8.5=
=====================
0 Kudos
Message 8 of 12
(3,748 Views)
Use shift registers to store the location of the cursor from one iteration to the next.
0 Kudos
Message 9 of 12
(3,743 Views)
There is a graph method called Map Coords to XY which will give you the XY location on the graph of a mouse click (use the mouse location from the event as the input).  There are similar methods for list boxes, multi-column list boxes, tree controls, etc.

Note that it may be easier to do what you want to do using a picture control.
0 Kudos
Message 10 of 12
(3,725 Views)