Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Measurement Studio 2010 Waveform Graph and 100% Processor Utilization

I have an application where I need to graph data that is being generated at 1000 Hz, and may have up to 12 channels of this data.  The software is currently using a WaveformGraph, and the PlotYAppend(Double[], Double) method to add data to a Plot.  On my development machine (Core i5 @ 2.6 GHz, Win 7 64-bit) the performance looks to be acceptable, but when run on an older class of machine (Pentium 4 @ 3 GHz, Win XP 32-bit) the processor quickly hits 100% utilization, and the graph has trouble keeping up.  I've tried some of the suggestions for optimizing performance (AntiAliased = false, SmoothUpdates = false, ImmediateUpdates = false) but these don't seem to improve performance.  Are there any guidelines as to the system requirements to achieve acceptable performance for these data rates?

0 Kudos
Message 1 of 2
(5,301 Views)

Hey John,

 

I'm not aware of any specific guidelines for system requirements with this type of application, but I suspect there might be some changes we could make in the code to lower the CPU usage.

 

One thing I would definitely recommend is to not update the graph every time a new point of data comes in. If you do this, you'll be calling the PlotYAppend() function 1000 times per second, which is much faster than necessary for the graph to look "smooth" to the human eye. Visual Studio will automatically update the graph image every so often (and that's what ImmediateUpdates is controlling), but regardless of how often a visual update is happening, the PlotYAppend function is still going to cause a lot of overhead if it's called once per data point.

 

Instead, I would recommend calling the PlotYAppend function once a block of data points has been collected--perhaps every 10 points. In this way, you'd be calling PlotYAppend() 1/10th as often as before, but still be updating the graph 100 times per second. This might help the CPU utilization and cause your graph to be able to keep up with the rest of the application.

0 Kudos
Message 2 of 2
(5,285 Views)