LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Limiting range of cursors on XY graph

Hello,
 
I am trying to find a way to put some cursors on an image (640*480bmp).  I don't have the machine vision package.  The best way I found to do this is to overlay a transparent XY graph on the bitmap.  I can then use the cursors and cursor position property nodes to put the cursors on reference marks on the bitmap to convert from pixels to centimeters.
 
My problem is that if the user pushes the cursor past the extent of the bitmap, it shifts the scales of the xy graph.  For instance say the cursors are on the bitmap image on a reference mark that designates the center of the image (320,240).  When the cursors are on this reference mark, they should display (320,240) which works fine.  However, say the user moves the X cursor way of to the right, to what would be past the edge of the bmp.  The cursor does not acutally move past the edge since the XY graph is the same size as the bitmap.   The problem is that the X scale slides and the cursor is free to move way past 640 pixels.  So now if the user puts the cursor back on the reference mark at the center it may read 619 etc instead of 320.
 
Is there any way to limit this sliding scale property of the XY graph?
 
If this is not clear, I can post my code but it really needs to be cleaned up.
 
Thanks,
 
Nathan
0 Kudos
Message 1 of 3
(2,747 Views)

Hi Nathan,

What you want to do is turn off the cursor scrolling property.  If you right click on the XY graph go to "Advanced" and you will see an option called "Cursors Scroll Graph" which is checked by default.  If you uncheck this option the user will not be able to change the x or y axis by dragging the cursor.

-Justin D

Message 2 of 3
(2,730 Views)

Justin,

Perfect, thats exactly what I need.  Was trying to edit the properties of the graph from the block diagram- didn't remember that the options are different from the front panel.  That's one thing that's kind of annoying about LabView sometimes.

 

Knew it had to be something simple- almost always is.  Appreciate the info-

Thanks,

Nathan

0 Kudos
Message 3 of 3
(2,723 Views)