12-09-2013 12:41 PM
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
Solved! Go to Solution.
12-09-2013 03:27 PM
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...
12-09-2013 04:03 PM
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.