LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dotnet system.array to method

Solved!
Go to solution

Hello board

 

I am stuck in calling a dotnet assembly in LabVIEW. The final step is to pass a system.array into a method to have the result of the method call written into this array. I don't really understand how to do this.

 

Help is greatly appreciated.

 

The details are in the attached LV2011 example.

 

Thanks

Dermot

0 Kudos
Message 1 of 3
(2,793 Views)
Solution
Accepted by topic author DAckermann

Is your LabVIEW code supposed to match the C# code in the comment above it?

 

Instead of reading the file as a text file, read it as a binary file and set the data type input to an array of the correct numeric type. When you read the file as a text file, it may convert the end-of-line character for you, which can cause corrupt the data. Also, it will be more memory efficient because you skip the unnecessary conversion from string to integer.

 

I don't understand exactly where your problem is, and the code doesn't make it clearer, but this link might help show how to convert a LabVIEW array into a .NET array: http://forums.ni.com/t5/LabVIEW/How-to-pass-a-Labview-array-into-a-C-NET-array-object/m-p/1992795#M6...

0 Kudos
Message 2 of 3
(2,770 Views)

Thank you for the link. This seems to show a solutionfor my problem. I didn't know how to instanciate a dotnet array in LabVIEW. And I have to say it doesn't look like fun 🙂

 

The file code is just for the testing. In the final application the jpeg is going to be as byte array in the RAM.

0 Kudos
Message 3 of 3
(2,760 Views)