01-05-2018 02:27 PM - edited 01-05-2018 02:28 PM
Looking to write a script to calculate FFT in dB. I ran across an old help topic that gave a calculator formula to do this:
Ch("[1]/AmplitudeDB") = 20*Lg(Ch("[1]/AmplitudePeak")/.01)
When I run this through the calculator under Analysis everything works as expected. The issue is when I try to run this via a script, I have to Call the Calculate Function, this still works, however it's much, much slower. It takes over a minute vs almost instantly when working from the calculator. The code I'm using:
Call Calculate("Ch(""[1]/AmplitudeDB"") = 20*Lg(Ch(""[1]/AmplitudePeak"")/.01)")
Any ideas on what could be causing the slowdown? Is there a better way to do this?
01-08-2018 10:17 AM
Hi,
Often, these timing issues can be a result of the loading behavior that is chosen in settings. Take a look at the following option in settings:
What is it set to currently? If you change this setting, does the calculation time change?
Alex C.
National Instruments