JackHamilton Posted April 15, 2005 Report Share Posted April 15, 2005 I discoverd this bug after a few hours of checking and rechecking a peak detection algo - using cursors to display the 'found' peaks in a graph. However, my algo was find points just before or after the peaks... :headbang: Well my algo was correct - I was chasing a bug in the graph cursor XY position property. As bewildering as the properties are there is a property under cursors a cluster called "Cursor.Position" who's elements are X,Y. I was wiring the data to that property only to find that although I input the X value of 0.0476 (in units of time - it's a waveform graph) LabVIEW was putting the cursor on the 0.477 index !?!?!. It can't be a rounding issue the number I input is much closer to the proper value then the one the graph choose on its own... Even reading back the Cursor properties immediately after setting it - showed it simply ignored my input value and choose the next X axis point over. However, there is ANOTHER property called "Index" expressed as integer for the X axis - wiring the index there - DOES cause the cursor to actually locate to the desired point. This is one of those times where a stupidly simple 'cute' features burns time like an x-wife on her spouses VISA card. Sheeze!!! Jack Hamilton Quote Link to comment
Michael Aivaliotis Posted April 15, 2005 Report Share Posted April 15, 2005 Jack, could you post an example VI for this? Quote Link to comment
JackHamilton Posted April 25, 2005 Author Report Share Posted April 25, 2005 Mike I would, but I burned so much time on that project 5+ hours on the cursors. I just can't bring myself to go there again! I did learn that the problem really is with wfm datatypes passed to the graph and the X axis being in time. As we all know X-axis time plotting has always been whacky You have can't pass the X position value as an integer, you have to take the index and / dt value to get the 'time' position on the x axis. If I run into it again I'll holler. PS: They made some changes to this in LabVIEW 8 Regards Jack Hamilton Quote Link to comment
malef Posted April 25, 2005 Report Share Posted April 25, 2005 Jack, please just answer a simple question: Are you working with absolute or relative time in your Waveform Graph? Greetings Manfred Quote Link to comment
fjharris Posted January 24, 2008 Report Share Posted January 24, 2008 QUOTE(JackHamilton @ Apr 15 2005, 07:34 AM) I discoverd this bug after a few hours of checking and rechecking a peak detection algo - using cursors to display the 'found' peaks in a graph. However, my algo was find points just before or after the peaks... I've reproduced this bug (?) in Labview 8.5, with an XY graph doing much the same as Jack. The attached zip file contains a stripped down version of my program (originally written by my coworker, Andrew MacDonald). Run "RENA3 Data Viewer.vi" and follow the instructions. As Jack said, changing Cursor.PosX to Cursor.Index solves the problem. Fraser Quote Link to comment
Rio C. Posted July 10, 2008 Report Share Posted July 10, 2008 QUOTE (fjharris @ Jan 23 2008, 05:36 PM) I've reproduced this bug (?) in Labview 8.5, with an XY graph doing much the same as Jack. The attached zip file contains a stripped down version of my program (originally written by my coworker, Andrew MacDonald). Run "RENA3 Data Viewer.vi" and follow the instructions.As Jack said, changing Cursor.PosX to Cursor.Index solves the problem. Fraser I have run into this issue when trying to set the cursor position in a waveform graph of an FFT. I was always getting a result that was just under the value I was trying to move the cursor to programmatically. I found that if I made the graph very large ~2000 pixels on the horizontal I would get the correct result. Another thing is the graph has 131072 points. I didn't want to keep my graph that large so I resorted to using index, which worked. However, that means I have to throw in some extra calculations because the indices are not the same as the x-axis values. Rio Christensen Quote Link to comment
thols Posted August 23, 2008 Report Share Posted August 23, 2008 Did some :headbang: with the same bug in LV 8.5. BUG: The Cursor value is ignored and another value, many indices earlier in the array, is used Hint: If I zoom in on the graph, the set cursor is more accurate. 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.