11-10-2005 07:25 PM
11-11-2005 11:30 AM
11-13-2005 08:25 PM
11-14-2005 07:45 PM
I change my code to
try
{
double dTF =TargetFrequency;
MathError error = CNiMath::HarmonicAnalyzer(SpectrumArray
,dw_WaveArraynSamplePerSec
,dTF,harmonicAmp,harmonicFreq,*thd,thdNoise
,iInputBufferNumber ,HarmonicNumber,static_cast<CNiMath::WindowType>(i_WindowType));
} catch (...)
{
char ErrString[1024];
sprintf(ErrString, "Error: only %d Harmonic", harmonicFreq.GetSize());
DE_ShowRunningInformation( ErrString);
*thd = -1;
return false;
}
And I will get 'Float devide by zero' exception, and there has only 2 harmonics. So I doubt there has bug inside NI component.
11-16-2005 11:00 AM
Hey Bird,
Are you saying that the issue is with the environment and not with Measurement Studio? If so you may need to contact Microsoft.
11-16-2005 06:26 PM
11-18-2005 07:20 AM
Hey Bird,
When you say something like: "So I doubt there has bug inside NI component." Then I'm led to believe that you are assuming it is not the NI component that is causing the problem. That's why I suggested contacting MS. But if you still believe it is the HarmonicAnalyzer() function that is not handling the error correctly I want to make sure we figure this out. We are not able to reproduce the issue. I had R&D try and reproduce it and they can not reproduce the error. Do you have a simple project that will reproduce it? If so can you post it? If you do not feel comfortable posting it then can you post an email address and we'll take this offline? Sorry for the confusion.
11-21-2005 03:43 AM
11-21-2005 01:32 PM
11-21-2005 08:42 PM
Hi Sam,
I upload that 'HarmonicAnalyzer.zip' today. Thank you for your help.