03-26-2015 09:38 AM
How can i stop the fourier transform vi if the user accidentially throws in too much data and it needs too long to finish?
Guess i should use the async call vi's from the application control palette and block other calls with a semaphore until termination.
As far i can see, the FT vi is called in a separate thread by default. But i can't find any vi called "stop this thread instantaneously despite it has not yet finished" or something similar.
If possible i would not want to stop the whole vi on timeout (which would be easy with parallel while loops), but only the FT vi.
Even better i would like to give the user the choice if/when to stop the fourier transform.
Yours Labuser
Solved! Go to Solution.
03-26-2015 10:49 AM
The problem is that almost all of the signal processing functions are just wrappers around a DLL. To my knowledge, there is no way to programmatically terminate that DLL from within LabVIEW.
I think your best bet would be to just check array size before calling the transform VI.
03-26-2015 02:28 PM
How big is the input array to the fft? (Note that if there is a single NaN in the data, it might take hundreds of times longer, so watch out for that.)
Is the FFT 1D or 2D? If this a 2D FFT, you could replace it with a series if 1D FFTs and look for termination conditions after each slice, for example.
03-26-2015 03:54 PM
I fourier transform rgb images into 2D complex double arrays, make some modifications and then transform it back. if the image is too large (f.e. 2000x1200 pixels)
FT needs either some 10 seconds or just bombs the user with out of memory messages. With small images (f.e. 512x512) there is no problem.
If there's no way to programatically terminate a dll (maybe this should be proposed in begs and wishes) i think i will try to make separate 1D transformations and then
combine them later on again as you suggested.