LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to avoid cursor shaking in graphs

Hello Everyone,

 

I'm aquiring data from a sensor at a rate of 20 ms per sample. In the same loop, I'm plotting the acquired values into the graph. Also my graph has two cursor in it for ranging purpose. 

 

While running the loop for 20ms delay, the cursors in graphs were shaky from the front panel. Please help me how to avoid this  ?

 

Thanks in Advance.

 

 

Regards,

Vijay

0 Kudos
Message 1 of 7
(2,946 Views)
could you send your vi or at least example like your vi
0 Kudos
Message 2 of 7
(2,941 Views)

You are asking the display to update itself 50 times a second.  I don't know the parameters of your graph/chart (you failed to attach code, meaning your VI), but I could well understand that this rapid rate of data update might "clash" with the "speed of redrawing" of the plot in such a way that the cursor, anchored to a particular point on the plot, might vary slightly from update to update as the number of points, or the plot origin, or the plot scale, vary.

 

One might ask why you have two cursors on a plot that is varying so rapidly.  You expect the values that the cursors show to potentially vary at 50 Hz -- it is pretty hard for the human eye to make sense of numeric data that are changing that rapidly (write yourself a little VI that generates and displays a random number at 50 Hz, and see how difficult it is to see/understand such a display).

 

Bob Schor

0 Kudos
Message 3 of 7
(2,923 Views)

Vij@y wrote:

 

I'm aquiring data from a sensor at a rate of 20 ms per sample. In the same loop, I'm plotting the acquired values into the graph. Also my graph has two cursor in it for ranging purpose. 

 

While running the loop for 20ms delay, the cursors in graphs were shaky from the front panel. Please help me how to avoid this  ?

 


As others have already said, we need to see some simplified code that demonstrates the problem.

 

  • How many points are on the graph? (constant? max, min)
  • Are the axes constantly autoscaling?
  • Are the scales set to autoadjust?
  • What are the plot styles (simple lines, antialiased, fills, etc.)?
  • Are the cursors constantly moving or mostly on the same point indices? Are they free or locked?
  • How big is the graph area?
  • Are there overlapping objects?
  • What else is on the front panel?

 

0 Kudos
Message 4 of 7
(2,907 Views)

Hello Everyone,

 

Thanks for all your valuable replies.

 

Please find the code attached with this.

Hope you people can better understand the problem. 

0 Kudos
Message 5 of 7
(2,841 Views)

Vij@y wrote:

Hello Everyone,

 

Thanks for all your valuable replies.

 

Please find the code attached with this.

Hope you people can better understand the problem. 


Do NOT create a rar archive and then rename it as zip. Your attachment cannot be opened using the plain windows explorer  tools..

 

(I can open in in 7zip, but why are you intentionally complicating things???)

0 Kudos
Message 6 of 7
(2,827 Views)

You have many charts, some hidden just used as a cheap history buffer. then you have overlapping graphs and such. Overlapping objects are more expensive to redraw.

 

Can you eliminate all the instrument VIs and make it into al demo VI that uses simulated data instead?

We currently cannot run anything.

0 Kudos
Message 7 of 7
(2,820 Views)