08-15-2006 03:12 AM
08-15-2006 08:10 AM
08-15-2006 09:30 AM
Hi
Thanks for the quick response! But what do you mean on "swap"? What should I swap in my parameters?
I work with LabView 7.0. Maybe what you mean is something new in LV8?
Gyula
08-15-2006 10:53 AM - edited 08-15-2006 10:53 AM
When passing a fixed array, use the following convention as shown below. Make your cluster with the ULONGs as U32 and the USHORT array as an array of U16 with 1 element. You must unbundle the cluster, convert the array into a cluster (right click on array to cluster function and set cluster size to 1), then bundle it all back up. The result is sent to the Call Library Node function. Set the parameter as follows:
Calling Convention = stdcall (or use C if it crashes)
Parameter = whatever you name it
Type = Adapt to Type
Data Format = Pointers to Handles
This should work. Note, only works for a definite sized array, in your case it is 1.
Note that in my example, my cluster is not the same as yours. Change the bundling to your needs.
Message Edited by tbob on 08-15-2006 09:55 AM
08-16-2006 04:51 AM
08-16-2006 06:18 AM
08-16-2006 06:51 AM
Hi all,
Well, tbob is right. The way what he proposed works. My problem was that I wanted to pass a U32 array with 16384 (!) elements. And the array to cluster function in Labview allows only maximum 256 elements of the output cluster. Thus, my function violated the memory after writing of the 256th element...
So I have to find a way, where the struct parameter looks like as it should. But the array in the struct must have at least 16384 elements.
Now I know the rootcouse, that´s a big step. But if you have any idea, how to create this input cluster without "array to cluster" in LabView, please tell me. In the meanwhile I am trying.
Guys, you really helped a lot. Many thanks for it.
Gyula
08-16-2006 07:10 AM
08-16-2006 08:54 AM
08-16-2006 11:04 AM