The current project I'm migrating from VB6 has code like this (I've simplified it and added some comments):

vb Code:
  1. StartTimer = Timer
  2. Penetration = 0 'variable for how far into the test it is
  3. Do
  4.     Penetration = (elapsed(StartTimer) / TestLength)
  5.     If Penetration > 1.1 Then Penetration = 1.1
  6.     Meter.Width = Label1.Width * Penetration 'acts as a progress bar
  7.     Meter.Refresh
  8.     DoEvents 'so Meter will really refresh
  9.     OutputVoltage = FullScale * Penetration
  10.     Call VoltsOut(OutputVoltage)
  11.    
  12.     Call ReadVoltage(Analog1, Analog2, Analog3, Analog4)
  13.    
  14.     i = i + 1
  15.    
  16.     TimeHistory(0, i) = elapsed(StartTimer)
  17.     TimeHistory(1, i) = Analog1
  18.     TimeHistory(2, i) = Analog2
  19.     TimeHistory(3, i) = Analog3
  20.     TimeHistory(4, i) = Analog4
  21.    
  22. Loop Until (Penetration >= 1) Or (Analog1 > TestSpec)
The processor is also being upgraded to a Core 2 Duo E7400 (from mid 90s CPU!).

So if it wasn't obvious, it's ramping voltage from 0 to FullScale over TestLength and storing input values into an array. It generally collects 30,000-50,000 records depending on TestLength so approximately 2,000 per second. Since a timer can't accurately handle that frequency, I'm assuming I'm stuck keeping it in a Do...Loop (or similar construct) or possibly using API functions as in game loops. If this is a fair assessment, which would be preferred?

The UI isn't too critical while this is running as the operator is just waiting for the test to complete. However, I would like to improve the flickering and would prefer to display a live chart of the curves generated instead of using a control like a progress bar (Meter above). Hence, I believe I will need to move this loop into it's own thread (something I need to learn to do). I've read a few of the CodeBank submissions on threading but don't have a handle on whether I should start one BGW to do the whole DAQ and charting or TWO BGWs (one for DAQ and one to Chart). If the latter, I'd appreciate some pointers on how that code structure may look vs just spawning a single BGW. FWIW, I am not intending to plot ALL the points, of course - I was thinking maybe every 100th point.

Any other tips that may help?

Thanks!