There are 6 waveform graph(waveformGraph1, ..., waveformGraph6.) in a Form.
I am trying to display 6 waveform graph which has 200 channels(65536 samples per 1 channel).
[waveform plots data]
data1 : double[200][65536]
data2 : double[200][65536]
data3 : double[200][65536]
data4 : double[200][65536]
data5 : double[200][65536]
data6 : double[200][65536]
Below is part of the code.
// waveformGraph1
NationalInstruments.UI.WaveformPlot[] arrPlots1 = new NationalInstruments.UI.WaveformPlot[200];
for (int i = 0; i < arrPlots1.Length; i++)
{
arrPlots1[i] = new NationalInstruments.UI.WaveformPlot();
waveformGraph1.Plots.Add( arrPlots1[i] );
}
// waveformGraph2
...
// waveformGraph3
...
// waveformGraph4
...
// waveformGraph5
...
// waveformGraph6
NationalInstruments.UI.WaveformPlot[] arrPlots6 = new NationalInstruments.UI.WaveformPlot[200];
for (int i = 0; i < arrPlots6.Length; i++)
{
arrPlots6[i] = new NationalInstruments.UI.WaveformPlot();
waveformGraph6.Plots.Add( arrPlots6[i] );
}
// upper is in the constucor and below is part of plotting every second.
// plot
for (int i = 0; i < 200; i++)
{
arrPlots1[i].PlotY(data1[i]);
arrPlots2[i].PlotY(data2[i]);
...
arrPlots6[i].PlotY(data6[i]);
}
The problem is that screen update is very slow(lag).
How can i solve it?