LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

X Y coordinates display for a cursor on a waveform (graph)

Maybe it has been asked before, but how the heck do you make the cursor display the actual  X,Y coordinates. It seems that such simple task that is available in may other programs does not exist on Labview....
 
thank you
0 Kudos
Message 1 of 9
(7,478 Views)
Actual X,Y coordinates in relation to what?  The Screen(Monitor) or the Vi front panel?  There are a couple of properties you might want to look at.  You can get a property to the Front panel origin(Top,Left).  You can also get a property to the position of the XY graph(Top,Left) and you can also access the cursor position through a property node on the XY graph.  You could add/subtract these origins with the cursor position and then display the actual coordinates.

0 Kudos
Message 2 of 9
(7,465 Views)
Npoling is right.  It's difficult to understand exactly what you want to do.  I'm not sure if this is what you're looking for, but here is a vi that calculates the location of the cursor on an xy graph.
0 Kudos
Message 3 of 9
(7,456 Views)

What I want is to display the actual cursor position inside the graph right where the cross of the cursor is, for example:   + (1,2) .

 I do have the cursor window next to the graph but it is useless since I want the cursor location to be saved on the graph when I export the graph as an image.

Pretty much like Matlab when you activate the cursor....it tells you where you are and displays that inside the graph.

The only thing that I can display is the lable of the cursor....useless..... 

 

0 Kudos
Message 4 of 9
(7,449 Views)

You can add the coordinates to the cursor name with a a property node and a Format Into String.

Message Edited by Dennis Knutson on 01-05-2007 12:45 PM

Message 5 of 9
(7,440 Views)

And yet again "Billy the Mountain has tromped on Edwards Air Force Base" (Billy the Mountain by Frank Zappa). Smiley Mad

But here is my version anyway. Smiley Very Happy

Ben

Message Edited by Ben on 01-05-2007 02:04 PM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Download All
Message 6 of 9
(7,424 Views)

Thank you very much,

I added one of the versions, but now how do I change the active cursor....I duplicated the same structure in the while loop and declared cursor 1....but both cursor are grabbin the label of cursor 0....

0 Kudos
Message 7 of 9
(7,383 Views)
Hi martine,

you also should set active cursor while reading the actual values (left side of your attached pic)!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 9
(7,369 Views)
One point to add:

Rather than regularly polling in a loop and always updating all cursors, in 8.2 (and 8.0, i believe) you can watch for the Cursor Move? event on the graph and update the cursor name/label only when it is moved.  Obviously you would need to make a first pass before entering your event-handling loop to populate the label/name of all cursors initially.

J
Jason King
LabVIEW R&D
National Instruments
0 Kudos
Message 9 of 9
(7,347 Views)