From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-20-2006 06:20 AM
04-20-2006 07:29 AM
Hi MiniMe,
I agree that it seems to be related to the HarmonicAnalyzer function. It is an additional function call as compared to the "PEAK_FREQUENCY" case. You may want to single step into that function.
The error message indicates that TestStand caught an access violation or some unexpected non-TestStand exception. This can occur when calling a code module that generates an access violation or more likely in this case; when calling a code module with an argument list that does not match the actual parameter list.
For instance, when calling a dll function incorrectly ( ie passing a I16 instead of a I32 in the parameters).
Try single stepping into your code and make sure that all your reference are valid if and when you call/release them. Also double check the parameters list.
I placed a couple of links below that discuss this error. Here is a description from another post:
"The TestStand error -17502 is TS_Err_OS_Exception which suggests that the CVI DLL is executing some code that is causing an access violation or some other type of exception. TestStand catches this unexpected exception and tries to recover by just displaying a run-time error for the step. You will have to review your code and possibly trace the code to try to figure out where the exception is being thrown. I believe that CVI 7.0 can trap exceptions. If you debug the TestStand application using CVI and debug your DLL, does CVI display a message box saying that an exception occurred? Does the debug output window of CVI show any exception information?"
Here are links that discuss the error message:
http://forums.ni.com/ni/board/message?board.id=330&message.id=7557&query.id=68761#M7557
http://forums.ni.com/ni/board/message?board.id=330&message.id=181
Regards,
Ray
04-24-2006 01:55 AM
Hi,
You seem to have some arrays passed to this function, (HarmonicAmplitudes, HarmonicFrequencies), which are declared locally, where are this setup, because there are likely to have garbage in them.
Regards
Ray Farmer
04-24-2006 04:51 AM
I choose to have the two arrays declared locally, because I don't actually need the data that HarmonicAnalyzer places in there. I just need the thdNoise calculation.
I tried a different application, without using Testand, just made a simple CVI application, that generates different waveforms and then calculates the THD and THD Noise, I had from time to time error code -20018 returned by HarmonicAnalyzer function. Is there a link between the two errors?
Regards
04-24-2006 02:55 PM
04-26-2006 03:49 PM
04-27-2006 09:51 AM
04-30-2006 03:57 PM
05-01-2006 04:11 PM