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

<EDITORIAL RANT>

I have come to the conclusion that Waveform Graph Cursor Lists are just about the most important tool that LabVIEW has for conveying important [or critical] information to the end user.

Unfortunately, I've also come to the conclusion that the Cursor List library is just about the buggiest library in all of LabVIEW.

Yesterday, I spent eight hours isolating a bug in a very large VI within a very large project [all the while thinking it was a mistake in some of my mathematical calculations] only to discover around midnight that it was a bug in the Cursor library.

This morning I woke up and had an idea what the problem might be. Sure enough - I was right [more on that below], but it took me another six hours to isolate the problem and write a VI that confirmed my hypothesis [attached below].

Guys, I can't keep wasting time like this!!!

Will somebody in NI management PLEASE assign a crack LabVIEW developer to clean up the Cursor List library? I can stomach some of the minor bugs - first letters in Cursor names are smudged unless you begin the string with an empty space, or wiring a FALSE to "Cursor.Visible" followed by wiring a TRUE to "Cursor.Visible" doesn't return the Cursor to visibility [instead you have to delete the Waveform Graph and install a new one from the Controls Palette] - those I can handle, because at least they're obvious [visually].

But this one yesterday [and today] just about killed me.

PS: Is there any way we can get Cursor functionality for Waveform Charts? I've just about had to re-write the entire Waveform Chart class from the ground up as a modified Waveform Graph, just so I can get Cursor functionality in a Chart-looking thingamabob, and the result is really taxing the CPU and the memory bus [since LabVIEW doesn't give me access to pointers].

</EDITORIAL RANT>

Okay, here's the bug: As far as I can tell, Waveform Graph Cursors with "Lock Style" set to "1-Snap to point" or "2-Lock to plot" simply don't work. You tell the Waveform Graph to display them, and nothing happens - the Cursors are sent to the far left of the Graph [x = 0], and there they sit, no matter how loud you yell at your computer.*

Just to make sure it wasn't some problem with "Ignore Timestamp" [which has given me WORLDS of hurt in its own right], or "Allow Drag", I wired some controls with those values and tested all the cases [{T,T}, {T,F}, {F,T}, {F,F}].

Nada. Didn't make any difference whatsoever.

So, as far as I can tell, the ONLY way to get a Cursor to display on a Waveform Graph is to use the "Lock Style" of "0-Free". The other two Lock Styles are utterly bogus.

See the attached VI.

*Maybe we could re-name the Cursors library, and call it something like the Curses library.
0 Kudos
Message 1 of 15
(3,833 Views)
The second file, Sine Waveform.vi, is required for the first file to compile properly.
0 Kudos
Message 3 of 15
(3,825 Views)
I just threw together a little VI that should have offered a workaround: First create the Cursor as "0-Free", get it out into the middle of the Waveform Graph, and then switch it to "1-Snap to point" or "2-Lock to plot".

Guess what? EVEN THE WORKAROUND DOESN'T WORK!

Guys, this is a really, really bad situation. I hope I've misunderstood something here, because I had planned a heckuva lotta end-user interfaces using that "Lock to plot" functionality, and if I can't get it, I'm in deep doo-doo.

To the point where I might have to abandon LabVIEW for this project.

HELP PLEASE!!!
0 Kudos
Message 4 of 15
(3,815 Views)
Have you tried setting the Active Cursor first before setting the other properties?
0 Kudos
Message 5 of 15
(3,786 Views)
Hi,
I dont use cursors in my applications so im not very familiar with them, but I recall reading that you need to set the cursor index when using snap to point.
0 Kudos
Message 6 of 15
(3,775 Views)
HI Tarheel,

I think David is correct about setting the index of the point to which the cursor should snap when those other modes.

Since you like the cursor list so much, I thought I would share a little tidbit.

Right-clicking on the cursor legend will let you create>>>property node.

From there you can select value.

Using that node can manipulate all of your cursors at a single blast.

I added an indicator (and David's index) to your example.

See attached.

This techinique lack documentation "out of the box" I sat down and created a cluster definition for this structure once. Can't find it on this machine.

I think David's idea will keep you going,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 7 of 15
(3,766 Views)
Thanks for your help, but I only have access to LabVIEW 7.0 at this time, so I can't open your VI.

Could you describe what you guys mean by "setting the index of the point to which the cursor should snap"?
0 Kudos
Message 8 of 15
(3,753 Views)
0 Kudos
Message 9 of 15
(3,751 Views)
Instead of wiring to CrsList, wire directly the XY coordinates to Cursor>Cursor.Position (expand the property node under CrsList, right-click and select Cursor>Cursor.Position). That solves the problem.
If you use several cursors, you will have to set the "Active cursor" number first.

Of course, wiring to an XY position while in cursor-locked mode suppose that the coordinates correspond exactly to an existing point. That's why it is often better to use the cursor index as suggested by David, but that implies searching in the XY cordinate array...

I'll try to spend some more time on the CrsList wiring problem...

CC
Chilly Charly    (aka CC)
0 Kudos
Message 10 of 15
(3,592 Views)