07-27-2006 05:10 AM
07-27-2006 05:35 AM
07-27-2006 08:20 AM
07-27-2006 09:47 AM
07-27-2006 10:11 AM
07-27-2006 10:52 AM
My guess here is (and sorry if you're not happy getting a guess from the blue bars 🙂 ) is that LabVIEW can't guarantee in-placeness when calling the DLL in the subVI. LabVIEW generally checks for in-placeness in subVIs to determine if it needs to create a new buffer for the output values, or if it can reuse the input buffers. If the input buffers are not resized or otherwise altered, LabVIEW will try to reuse them and thus save the trouble of allocating new memory.
My guess here is that LabVIEW can't know if the dll call is going to resize the array or not, since dlls generally operate like black boxes. Therefore it has to create an additional buffer copy for the output. This will take some time and add some overhead. Turn on Show Buffer Allocations for your test VI and you can see indeed that an additional buffer is created for the output data of the VI and not the CLFN.
Regarding the documentation of the DLL, NI has done a great deal of work describing in detail the algorithm used for the standard LabVIEW analysis functions, as well as how to use them in their native implementation (subVIs). I would imagine if you wanted to circumvent that implementation, you're on your own, but you certainly have a lot of examples to work with. Hope this helps!
07-27-2006 01:56 PM
07-27-2006 02:05 PM
Sorry to keep reposting, but I just thought of a good reason why it might not be a good idea to directly call lvanalys.dll rather than going through the correct subVI interface. You might have issues if the dll function calls are changed in future versions of LabVIEW. If you use the FFT subVI, then the later version of LabVIEW would automatically replace it in your code with the appropriate new version of the FFT VI that called the lvanalys dll correctly when you converted it. If you are directly calling the dll, LabVIEW won't know how to convert the dll function calls appropriately. This could cause you major headaches.
I have no idea if this is very likely to be a problem or not likely at all, but it's something to keep in mind. Hope this helps!
07-28-2006 03:50 AM