Jump to content

cursor question


Recommended Posts

I'm using LabVIEW 2010 full dev pkg to create a simple VI with a graph displaying an array of 100 random values in 1 plot, then added 2 cursors, t0 and t1, both free dragging types. The cursor legend shows each cursors x and y values as expected. Entering 0 and l into the Selected Cursor array property allows me to control one or both cursors being moved via the cursor control: OK. The Cursor.Cursor Position property shows the X and Y values for the second (t1) cursor no matter what I put into the Selected Cursor property. I would like to be able to programatically read the X value of both cursors, but have not yet discovered the answer. Can someone enlighten me?

Link to comment

I'm using LabVIEW 2010 full dev pkg to create a simple VI with a graph displaying an array of 100 random values in 1 plot, then added 2 cursors, t0 and t1, both free dragging types. The cursor legend shows each cursors x and y values as expected. Entering 0 and l into the Selected Cursor array property allows me to control one or both cursors being moved via the cursor control: OK. The Cursor.Cursor Position property shows the X and Y values for the second (t1) cursor no matter what I put into the Selected Cursor property. I would like to be able to programatically read the X value of both cursors, but have not yet discovered the answer. Can someone enlighten me?

I don't have a problem getting the correct value in LV2009. Of course, you would get a constant value for Y if you use free-dragging cursor, but X value should follow the cursor.

If you think this is an issue with LV2010, I suggest you address the problem in the NI forum for LV2010 Beta until this version is officially released. As I am not a beta tester for LV2010, I cannot check if this is a bug or not. Can you try the same code in LV2009?

Link to comment

I don't have a problem getting the correct value in LV2009. Of course, you would get a constant value for Y if you use free-dragging cursor, but X value should follow the cursor.

If you think this is an issue with LV2010, I suggest you address the problem in the NI forum for LV2010 Beta until this version is officially released. As I am not a beta tester for LV2010, I cannot check if this is a bug or not. Can you try the same code in LV2009?

I'm using 2009 version: excuse miss print. The cursor window does show the correct X values for both cursors, but the property node only shows the position of the second cursor no matter which cursor has been selected. I did not see how to get another property for cursor position, so I assumed that the position given by the property node is the position of the selected cursor. Was I wrong?

Link to comment

I might have an explanation.

Are you using the "Selected Cursor" property? If so, try "Active Cursor" instead.

Here are three ways to get the values you want.

post-10515-003399900 1279284591_thumb.pn

I started the example once again from scratch using free dragging cursors with the ActCrsr and Cursor.PosX properties and got the position of both cursors. I think what I did was to use a single or multi plot cursors and then tried to change to free dragging without deleting and recreating a new cursor. Your three examples basically do the same thing and I thank you for your feedback. BTW Montreal is quite beautiful...

Link to comment

Join the conversation

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

Guest
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.