LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building DLLs from VIs with array as output

Is there any special way to build DLLs from VIs having arrays as outputs. Suppose I have a VI "Random" with input "nrand" and output an array "the_random2". When I build DLL from the VI, I have something like this in my header file

void __stdcall Random(long nrand, double the_random2[]);

Now it returns void. So I have to pass the array as pointer and retrieve it. If I use Mathscript to load the DLL and call this function, how do I pass the pointer to the array "the_random2"? Simply speaking, any useful method to build DLLs with array outputs and the right way to call them from Mathscript would be appreciated.

Regards
NRK

0 Kudos
Message 1 of 2
(2,270 Views)
Hi,

Building DLLs in LabVIEW is described in this tutorial.   Mathscript can call shared libraries such as DLLs, however make sure that they are compliant with the supported data types as stated here in this help page.  All supported functions for calling/loading shared libraries is described here.  Note that these functions are not supported with the base package.  The details of the sytax of each function is described in their specific help page.

Hope this helps!

Regards,

Nadim
Applications Engineering
National Instruments
0 Kudos
Message 2 of 2
(2,244 Views)