Hello,
I am running a continuous data acquisition with a NI-PCI 6133 (4x AI channel @ 2,5MS/s each) on a WIN 7 PC (LabView FDS 2012). Inside a while loop I am able to acquire 2000 samples per loop from each channel with a stable loop performance of around 1,25kHz. Out of this data I am calculating 24 values which will be shown on 6 xy-graphs (4 values on each graph). The data acquisition runs up to 2 minutes.
Data preparation and updating xy-graphs seems to be a big performance bottleneck. To clearify this I have written a simple benchmark, comparing xy-graph performance and chart diagramm performance. For the same amount of data, the chart diagramm is around 3 times faster, depending on the ability to draw only the last new value. The xy-graph has to update the whole plot each iteration.
If I also delete the complex data preparation of the xy-graph, the chart diagramm ist up to 6 times faster.
Benchmark xy-graph
Benchmark chart diagramm (including data preparation for xy-graph)
Benchmark chart diagramm (without data preparation for xy-graph)
Questions
- Is there a way to optimize the data preparation part of the xy-graph?
- Is it possible to draw only the last new value of an xy-graph like a chart diagramm?
Why can't I not use a chart diagramm?
- Because the time base ist not constant.
My ideas:
1.) During a measurement I am using a chart diagramm. I know there will be some failure depending on the varying timebase. After acquisition the acquired data will be shown in xy-graphs (only one update necessary) with the right timebase.
2.) I am not showing the whole data inside a xy-graph. Maybe just the last 1000 values would be enough.
Benchmark xy-graph with just showing the last 1000 values
Are there any other ideas how to speed up xy-graphs?
Thanks a lot and best regards,
Michael