LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Keys don't move graph cursor in snap to point mode, mouse does.

CVI 6.0.0 (105) / NT4 SP6 / P4 / 256 MB

My application has a graph control in "hot" mode with one cursor enabled in "snap to point" mode. The cursor can be moved with the mouse and correctly snaps to data points. However, the keyboard controls have no effect at all. Switching the cursor to "free form" mode cures the problem, but I really need to use "snap to point" mode. Any ideas? TIA.
0 Kudos
Message 1 of 5
(3,293 Views)
Stephen,

"snap to point" cursors behave differently with respect to the keyboard, but it is not the case that the keyboard has no effect at all (unless you've stumbled into a bug of some kind).
You can read up on the expected keyboard behavior for snap-to-point cursors by typing "Operating Graph Controls" in the index of the online help.

Luis Gomes
NI
0 Kudos
Message 2 of 5
(3,293 Views)
Luis,

Thanks for your response. The online help was my first port of call, but did not resolve the problem. The mouse controls the cursor as expected, but the keys produce no movement at all. I would suspect a problem outside of CVI if it wasn't for the fact that it works correctly in freeform mode.

At present, and until we've defined some data structures and storage formats, I'm populating the graph by plotting individual points in a loop using PlotPoint and PlotLine. Eventually I will do this using an array of data with PlotXY.

I also create a number of additional static (indicator mode) cursors which appear as vertical lines and serve to indicate frequency band endpoints on the graph. I do set the enabled crosshair cursor as the active cursor.


The fact that mouse control works makes me think that the cursor is properly enabled and active. The keyboard controls simply don't work.

When I have time I will set up a simple graph in a separate project to see if I can replicate the problem in a more controlled environment.

Stephen
0 Kudos
Message 3 of 5
(3,293 Views)
Luis,

I can now give you more information about the nature of this problem. When I made my original post I was populating the graph with individual points using PlotPoint and PlotLine. It was under these conditions that the cursor control keys where not working.

Now I am populating the graph with data arrays using PlotXY and the keys are working OK.

Hope this helps.

Steve Lomas
0 Kudos
Message 4 of 5
(3,293 Views)
Okay, I guess that makes sense.

Cursors can only snap to plots of some types (X, Y, XY, Waveform, Point and Polygon).
This means that they would ignore the ends of your Line plots and snap only to the Point plots (which I'm guessing coincided with the ends of the Line plots anyway). But the main reason why you couldn't operate the cursors with the arrow keys is because each point was in a different plot, so you couldn't move them from point to point as you do with an array-type plot.

However, there are keys that you could have used to move the cursor from plot to plot: and . Of course you're much better off using a single array plot anyway.

Luis Gomes
NI
0 Kudos
Message 5 of 5
(3,293 Views)