LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem setting cursor X position using Property Node

Solved!
Go to solution

I have two waveform graphs that each have a cursor.  I also have an event structor that have an event case triggered by "cursor release" in the first waveform graph.  When the cursor release occurs, the cursor X position "Cursor.PosX" is read from the first waveform graph using a property node, then this value is assigned to the Cursor.PosX for for the 2nd waveform graphy.  So it moves that cursor to the same position of the cursor in the first waveform graph.  However everytime I move the cursor the position moves but not to the right position.  It is always close but not exact.  If I move cursor in waveform 1 to 6.74e-6, then the cursor in the waveform 2 moves to 6.73e-6.  Sometimes it is the same, and sometimes it is off by 0.01e-6 or 0.02e-6.  Both waveforms have the same # of points and the exact same X data.  Thanks for any help. 

0 Kudos
Message 1 of 14
(10,835 Views)

What version of LabVIEW are you running?

Kareem W.
National Instruments
Web Product Manager
0 Kudos
Message 2 of 14
(10,793 Views)

Are the cursors free or locked to a plot?

 

Could you attach a simple example that demonstrates the issues?

0 Kudos
Message 3 of 14
(10,790 Views)

It is 2010. 

0 Kudos
Message 4 of 14
(10,779 Views)

They are locked to the plot. 

0 Kudos
Message 5 of 14
(10,778 Views)

@lme999 wrote:

They are locked to the plot. 


Do both plots have exactly the same xo and dx?

0 Kudos
Message 6 of 14
(10,770 Views)

This isn't exactly what I have, but it shows what I am talking about.  I have two waveforms with the exact same dt and the same number of Y points.  Yet when I read one cursor and try to force the other one to the same X position it won't work.  It is close, but not the same.  Thanks for any help. 

0 Kudos
Message 7 of 14
(10,764 Views)
Solution
Accepted by topic author lme999

I think the problem is caused by the fact that you plot a huge number of points per screen pixel, and since the axes are different, things get rounded differently. (This might be a bug, though). Note that If you show the data less dense (e.g. set the two x scale for 0 .. 0.1, your method works fine).

 

As a workaround use "cursor index" instead of "cursor position x". This gives you the index of the array point linked to the cursor and will be exact in all cases.

 

Message 8 of 14
(10,758 Views)

Thanks.  That works much better.  In my applications the X axis is always the exact same, but the Y axis is different, so I have no idea why the position doesn't work.  You are probably correct that it is some rounding issue of some kind. 

0 Kudos
Message 9 of 14
(10,739 Views)

hi,i want that the black ball pass by the same position of the 6 cursors on xy gragh ,i can't arrive to determine the right position of cursors

0 Kudos
Message 10 of 14
(10,402 Views)