Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there an easy way to put a filter in a do loop

Experts,

I'm aquiring analog input thru a do loop. Is there an easy way to filter the data? Average 2 or 3 points? Please see my code:

Public Sub cmdStart_Click()

Do While StopFlag <> True
CWAIPoint1.SingleRead Data
CWGraph1.ChartY Data
DoEvents
Loop

StopFlag = False

End Sub

thanks,
Brian
0 Kudos
Message 1 of 2
(2,977 Views)
Have you looked at the Measurement Studio analysis controls (see Visual Basic Help->Analysis Controls in the Measurement Studio reference)? Specifically, the CWDSP control might have what you need for filtering data, and the CWStat control may have what you need for averaging.

- Elton
0 Kudos
Message 2 of 2
(2,977 Views)