LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating large .NET Array

Solved!
Go to solution

My vendor requested a .NET assembly from me, a quite simple application in LabVIEW. The output of my method should be a 2D Array with over 1.0000.000 elements, i.e. [4][250000]. Passing a LabVEW array to .net doesn't work directly, so I have to create a .NET array programmatically, based on the LabVEW array. You can see on the snippet, how I do it. It is working, but... the To .NET Object.vi takes too long, and the conversion time for all the 1M element is not acceptable - neither for me nor for the vendor. 

Is there any faster way to do that? Or is there any other way to pass the array from LV to .NET?

 

CreateDotNetArray.png

0 Kudos
Message 1 of 5
(1,892 Views)
0 Kudos
Message 2 of 5
(1,870 Views)
Solution
Accepted by topic author Madottati

2D dotNET Array Bench.png

 

This returns TRUE. I didn't test 250000, because the 'old' method takes forever.

 

Both types are System.Double[,], so it seems to me they are the same.

0 Kudos
Message 3 of 5
(1,861 Views)

Hey, it is easier as I thought 😄  

I have done this, now I am waiting for reply from the .NET developer. On my side it works, the resulting .NET array has the same content as the LabVIEW array. 

 

Thanks!

 

 

CreateDotNetArray_2D.png

0 Kudos
Message 4 of 5
(1,857 Views)

@Madottati wrote:

Hey, it is easier as I thought 😄  


Sometimes you get lucky!

0 Kudos
Message 5 of 5
(1,851 Views)