LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

set the cursor in the middle in XYGraph

hi how to set the cursor in the midde programmatically?
need help plz?
 
for labview 8.0
0 Kudos
Message 1 of 9
(5,268 Views)
You can set the cursor anywhere you want using a property node. You can get the center coordinates from the min and max of the axes.
0 Kudos
Message 2 of 9
(5,264 Views)

Hello Jeyanthi

For playing with the cursor properties you have to use the property node to acces the cursor position and then write the value to it. The cursor position can be adjusted for both the x and y axis by selecting the appropriate property node. Property nodes can be accessed by doing a right click on the  xy graph terminal and then select the property that needs to be set.

I have attached a small Vi for your understanding. In this VI even if you scroll the cursor it still comes back to the center position of x axis.

Hope it helps

Ankit

0 Kudos
Message 3 of 9
(5,263 Views)
Here's a simple example (LV 8.0) showing how you can center the cursor with a button press.
 
 


Message Edited by altenbach on 06-18-2008 11:35 PM
Download All
0 Kudos
Message 4 of 9
(5,242 Views)

thk u. another help

how to set the plot color to contrast color for the first plot.

0 Kudos
Message 5 of 9
(5,231 Views)
What do you mean by "contrast color"??
 
(Again, you can set it to any color you want using a property node).
0 Kudos
Message 6 of 9
(5,227 Views)

@altenbach wrote:
 
Here's a simple example (LV 8.0) showing how you can center the cursor with a button press.
 
 


Message Edited by altenbach on 06-18-2008 11:35 PM

If some is looking for centering XY graph cursor programmatically, in LabView 2K12 it is possible to do this with locked cursors too.

There is a difference between setting XY position through property node and setting X and Y like in altenbachs example, that will result in moving the cursor to closest last set scale e.g. X or Y like the above case.

To deal with it, just set it directly through cluster as it uses 2D search instead of 1D.

 

snippy.png

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

Hi!

 

I have tried to implement this into my program, but for some reason it doesn't seems to work. The difference is that i have two vertical cursors that i want to bring to center. I have written a separated program just to verify if the center cursor code it self was wrong but it wasn't. It seems that my original code cant comprehend with this center function.

 

I was wondering if someone could take a look and help me understand why it is not working.

 

Best regards Maurlind!

0 Kudos
Message 8 of 9
(4,587 Views)

I noticed that when I have the cursors set on"watch , all plots"  The center function did not work. If i turned it of it centers my cursors, but then the main function of my cursors doesn't work. Because I need my cursors to be set on watch all plots in order to get the data required for my program. Is there a way to avoid this problem ? 

 

Best regards Maurlind!

0 Kudos
Message 9 of 9
(4,509 Views)