LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

INFURIATING BUG with Waveform Graphs, Cursors, and Snap to point or Lock to plot

I think I have got the answer. NO BUG !
Everything works as it should.

When you use the cursor list property, you write both the cursor index and the cursor XY to the property node. Means that you pass the same information twice. When the values are conflicting, there are rules to solve the problem :
When the cursor is free, the cursor index is less significant than the XY position (no information about the Y pos), so the XY position parameter has priority.
When the cursor is locked, the situation is reversed, since there are an infinite number of XY values that don't correspond to any point.

Simple when you think about it !

Conclusion : avoid using the cursor list to move the cursor.

CC
Chilly Charly    (aka CC)
Message 11 of 15
(1,297 Views)
Thanks everybody.

I wrote another VI which I think finally exposes the thing, and the logic looks like this:

If your cursors are "Free", then they look at "Position.X" and "Position.Y" and ignore "Index". If neither "Position.X" nor "Position.Y" are set, then they all aggregate at the far left of the screen [X = 0].

On the other hand, if your cursors are "Snap to point" or "Lock to plot", then they look at "Index" and ignore "Position.X" and "Position.Y". If Index is not set, then they all aggregate at the far left of the screen [X = 0].

So: Now that I've got the logic of the thing down, it doesn't seem so unreasonable - IT'S JUST THAT THIS ISN'T IN THE DOCUMENTATION ANYWHERE!!! If someone would have put those two cases in the Cursor Properties Help File, or the Cursor Locked Property Help File, it would have saved me about a week of my life chasing windmills.
0 Kudos
Message 12 of 15
(1,416 Views)
See my reply above - the logic makes sense once you figure the logic out, BUT THE LOGIC ISN'T DOCUMENTED ANYWHERE!!!

So we have to spend all this time figuring it out for ourselves.

Also, I've attached an example of another annoying little bug in the Cursor Library. I call it the "Phantom Cursor Bug" - if you're not careful, you can get a set of cursors permanently embedded in your Waveform Graph, and it's darned hard to get rid of them. [I think you need to wire an empty array of Cursors to your Waveform Graph, run the VI to clear the Waveform Graph, then quit the VI, then hit CTRL-S on your dead VI so as to make the flush permanent.]

It's kinda similar to [except that it's maybe the exact opposite of] the bug where you can wire a "False" to "Cursor.Visible" to make a Cursor disappear, but then subsequent instances of wiring a "True" to "Cursor.Visible" won't make the Cursor re-appear.

Anyway, I think the Cursor Library is just about the most powerful device LabVIEW has for allowing the end user to point to a place in the data [or maybe a segment of the data] and say "There, that's what we're looking for." I.e. if the end user has a Cursor that is "Locked to plot" with "Allow drag" then they can drag past all the noise, right to good stuff, and say "What we're interested in begins here" or "What we're interested in ends here". In fact, I don't know of any other good method in LabVIEW for providing that sort of end-user interaction with the data.

It's just a shame that the Cursor Library is so darned difficult to use - so poorly documented, and filled with so many nagging little bugs.

Well, maybe someone in the future will profit from some of the VIs I left here.
Message 13 of 15
(1,261 Views)
I completely agree with both you remarks: the cursor list can be extremely helpful for the end-user, and, YES, it is very badly documented.

Much of the functionality has to be discovered by experimenting.

Here is how you get rid of the phantom cursors:
(suppose the VI is in RUN mode, not in EDIT mode)
- right click the graph, select 'Visible items'-->'Cursor Legend'
- in the frame of the cursor list display, right click ans select 'Empty Array'

The cursor list is an array (of some clusters) and with the control editor you change the array design, eg make its index display visible which may be helpful for long cursor lists (you could even resplace the index display with a scrollbar).

I attach the VI with the index display of the cursor list visible
Message 14 of 15
(1,251 Views)


@tarheel_hax0r wrote:
...it would have saved me about a week of my life chasing windmills.




Come on man ! Have a nice cup of tea and try to be less agressive and severe with LabVIEW.

Everybody nows that LV documentation is not perfect. But you apparently found that LVusers are able to share their experience, and help beginners to understand the logic behind graphic programming.

Instead of chasing windmills, you should have read more carefully the answers to your question:
- The track to the solution was proposed by DavidT less than 6 hours after your first post (01-17-2005);
- an effective solution was given by Ben within 8 hours;
- I gave the explanation of your supposed "bug" in 13 hours;
That's quite far from a week and your quoted statement seems to be unrealistic.

About the two other supposed bugs, now :
- your "phantom" cursors appear normally on the cursor legend. They cannot be dragged because you didn't allow it (click on the lock in the cursor legend and select "allow drag"). You can suppress any cursor as any element of an array, either directly (right click on the cursor name in the legend, then select "Data operation>delete element") or programmatically using a property node. I don't see any bug here, but may be I missed something ?..
- the cursor visible property seems to work flawlessly on my machines. Apparently no bug again...

See the attached vi where these basic cursor manipulation operation are illustrated.
Chilly Charly    (aka CC)
Message 15 of 15
(1,249 Views)