LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array2DFloat **

Solved!
Go to solution

I am trying to access a function from a DLL that needs a float** input.

cvCreateHist( int dims, int* sizes, int type, float** ranges CV_DEFAULT(NULL),  int uniform CV_DEFAULT(1));

In labviews´s Call Library Function to input a 2D Array like this one can only pick Array Handle.

This in turn places an Array2DFloat ** struct into the input parameters.

uint32_t cvCreateHist(int32_t dims, int32_t *sizes, int32_t type, Array2DFloat **ranges, int32_t uniform);

How, or where, exactly is Array2DFloat ** defined?

0 Kudos
Message 1 of 2
(2,727 Views)
Solution
Accepted by topic author Eumel2

You don't want to use Array Handle (and, at least in LabVIEW 2012, I don't see the options restricted to Array Handle).

 

You can see how that parameter should be defined, if you were to use it as such, by right-clicking the Call Library Function Node and selecting "Create C file." The parameter type will be named differently but will be defined correctly in the created file. Note that it will not be a standard C array, so that's not what you want.

 

The easiest thing to do here might be to write a new DLL, containing a wrapper function, that expects a 1D array from LabVIEW and converts it to the 2D array expected by the DLL, then calls the DLL function. If you want to do it purely in LabVIEW, see this thread: https://lavag.org/topic/14642-passing-array-of-string-to-c-dll/

Message 2 of 2
(2,683 Views)