Jump to content

Programmatically make horizontal cursor track the trace.


Recommended Posts

I have graphs of (X,Y) cordinates (5, 0.19), (10, 0.38) & (20,0.78) respectively. In my VI labeled AA, the horizontal cursor tracks perfectly from 5 to 10 and not so well from 10 to 20. This is just as one would expect, since the slope from 10 to 20 has changed slightly. In vi labeled AB, I have made the code calculate the new slope and would expect correct tracking from 10 to 20. I was only able to achieve tracking by including a 0.4848 offset and even then it is not exact. A 0.38 offset might be understandable, but at present I cannot explain the error. I wish to understand this so that I can increase the complexity of my graphs and then experiment with "in range and co-erce". Any guidance would be much appreciated.

graph 3 points AA.vi

graph 3 points AB.vi

Link to comment

That is a fair question Ravi. I wish view to the Y value at various values of X. Before my attempt to control the horizontal cursor, I could simply type my X value into the cursor legend and the the vertical cursor would snap to that value (e.g. 14.4). I would then have to drag the horizontal cursor to the intersection of the trace and the vertical cursor. If I choose "snap to plot" from cursor properties, both cursors will only snap to values I have put into an array.

Link to comment
  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.