sydney Posted July 15, 2010 Report Share Posted July 15, 2010 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? Quote Link to comment
Francois Normandin Posted July 15, 2010 Report Share Posted July 15, 2010 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? Quote Link to comment
sydney Posted July 16, 2010 Author Report Share Posted July 16, 2010 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? Quote Link to comment
Francois Normandin Posted July 16, 2010 Report Share Posted July 16, 2010 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. Quote Link to comment
sydney Posted July 16, 2010 Author Report Share Posted July 16, 2010 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. 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... Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.