I want to acquire onesignal at 1 k freq and plot it contineously. the data should get appended to the graph. but i cant use the chart control for two reasons
1. all the data from 0 time should be visible on screen.
2. i want to dynamically place some markers which will point some perticular analysis in real time.
i have written one program for this but when i run it it contineously shows 100% CPU usage and data in acquisition buffer keeps on increasing. if i reduce the sampling rate to say 20 CPU usage drops down to 20 to 30% how should i improve my code. my test should run for atleast 1 Hr.
i suspect following may be the problems.
i get around 200ms data in one read operation in loop and i have used build array function to append new data points in the graph control (hence all the data gets plotted in each loop iteration)
in each iteration i have to check whether to do autofit and perform the operation (because client wants X scale to be configurable and if test continues beyond that time then scale should be changed to autofit)
there are 4 more graphs on the same screen (but they get 20 points in one second)
one more observation is that the whole graphs blinks quite often while ploting the data
please suggest me solution