I got a problem in useing the peak detector of CWDSP(measurement studio for VB6.0). If I am not worng, I guess it's a syntex problem, but I just can't find the right way. The VB compiler indicate "type mismatch" error in the line containing "CWDSP1.PeakDetector...".
The detailed code are as fallowed:
(Note: Before the code, I read the numerical data from a txt file to Darray.)
Dim Peaklocation(300) As Variant
Dim Peakamplitute(300) As Variant
Dim SD(300) As Variant
Dim Init As Variant
Dim Endofd As Variant
Dim Thresh As Variant
Dim Widt As Variant
Dim Porv As Variant
Init = True
Endofd = False
Thresh = 0.5
Widt = 20
Porv = 0
CWDSP1.PeakDetector Darray, Thresh, Widt, Porv, Init, Endofd, Peaklocati
on, Peakamplitute, SD
End Sub