From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Cursor slows when plot points(markers) are displayed

I'm displaying two plots on the graph (around 8000 points each). Whenever I place a cursor and try to move it while the graph displays lines (width 2 and up) AND points the cursor moves very slowly.
remvoing the markers solves the proble.

WHY?
Any solution?
I'm using A PIII 600 256Mb W2K
0 Kudos
Message 1 of 4
(3,103 Views)
Sorry I took awhile to post back here, but I was trying to replicate this as best as possible. I put this code into my trial project.

double array1[8000];
double array2[8000];

for (int i = 0; i < 8000; i++)
{
array1[i] = ((rand()/32767.0)*100.0);
array2[i] = ((rand()/32767.0)*100.0);
}

m_graph1.Plots.Item(1).PlotY(CNiReal64Vector(8000, array1));
m_graph1.Plots.Item(2).PlotY(CNiReal64Vector(8000, array2));

This just generates two random plots that are plotted all at once. The cursor behaved perfectly. But I have a 1GHz machine, and more RAM, so that is a possibility.....
In your case, you may be plotting within some type of timed loop, and while plotting, still trying to move the cursors. If this is the case, you have to think that you a
re placing too many calculations on the processor at one time. Try reducing your number of plots, or plot everything first.
Post back if you have any new information, or my post was way off the mark. Thanks.
0 Kudos
Message 2 of 4
(3,103 Views)
Hi,

First of all, I display the cursors after the data was completely plotted and no update loop is running.
Second, Did you try displaying markers (Points) on the plots and changing the width (Weight) to a thicker line?
The problem occurs only then.

Thank you
Ohad
0 Kudos
Message 3 of 4
(3,103 Views)
Yes, I did have the points on. The only way I can get the cursor to move slowly at all is to try to move the cursor very quickly. I think it is an issue of the software not having enough time to process all the "objects" on the graph panel.
0 Kudos
Message 4 of 4
(3,103 Views)