LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview dlls in vb

I have seen a few examples of how to pass or retrieve 1D array from Labview dll's. I'm wondering how to do it for a 2-D, 3-D, or n-D array. Are there any examples out there?
0 Kudos
Message 1 of 5
(3,255 Views)
Do you mean DLLs created in LabVIEW, or Calls to DLLs in LabVIEW?

I have passed data in and out of both types of calls (though I didn't write the C code to call the DLL.)

Please clarify. I may have an example for you.
0 Kudos
Message 2 of 5
(3,255 Views)
I'm trying to use the function call within VB from the dll compiled in LabVIEW. I was able to successfully do the calls for 1D array but I'm not sure how to do it for a 2D array. Everytime I do it I get memory read error. I'm not sure how you would declare a function prototype for a 2D array. For a 2-D integer array, can I use the same declaration as 1-D's:

ByRef intIntegerArray() as integer

Similary for string:

ByRef strStringArray() as string

If you have an example in VB and a LabVIEW vi + build file, it would be a great help.

Thanks a lot!
0 Kudos
Message 3 of 5
(3,255 Views)
This can actually be quite difficult to do. Visual Basic can make it rather difficult to work with multidimensional arrays. There is a Knowledge Base on National Instruments' website entitled How Can I Pass a Multidimensional Array from Visual Basic to a LabVIEW Built DLL? This discusses how you can access a multidimensional array from a LabVIEW built DLL.
J.R. Allen
0 Kudos
Message 4 of 5
(3,255 Views)
Thanks for the reply. Perhaps it might be easier if I stick with 1D or try writing in C++ instead of VB.
0 Kudos
Message 5 of 5
(3,255 Views)