srikanthp Posted August 25, 2005 Report Share Posted August 25, 2005 Hi, I am relatively new to LabVIEW (just 2 months of experience). I have created a .NET class and I was trying to instantiate that class in LabVIEW using the .NET constructor function. I have a .NET array as an input in the constructor and when I pull that class in LabVIEW, LabVIEW gives me a .NET reference instead of an array input. According to documentation, all .NET array classes (System.Array) are mapped to native labVIEW arrays. Am I doing something wrong here? Please help me. Thanks, Srik Quote Link to comment
Neville D Posted August 25, 2005 Report Share Posted August 25, 2005 Hi,I am relatively new to LabVIEW (just 2 months of experience). I have created a .NET class and I was trying to instantiate that class in LabVIEW using the .NET constructor function. I have a .NET array as an input in the constructor and when I pull that class in LabVIEW, LabVIEW gives me a .NET reference instead of an array input. According to documentation, all .NET array classes (System.Array) are mapped to native labVIEW arrays. Am I doing something wrong here? Please help me. Thanks, Srik 5850[/snapback] Hi Srik, No offense, but why don't you implement a pure LabVIEW solution? That should take care of all the headaches . LabVIEW has a rich set of array functions, if that is what you need.. Neville. Quote Link to comment
srikanthp Posted August 25, 2005 Author Report Share Posted August 25, 2005 Neville, Thanks for your suggestion. Basically, I am trying out a .NET solution for my project and I started with arrays as a test, hoping that I could easily work out a LabVIEW & .NET integrated solution. My final plan is to create a ASP .NET website (and/or) webservice and have LabVIEW access these classes from one end and also have a web site at the other end. I have two different set of users for my target application, 1) users who use LabVIEW to perform data analysis and create reports which would be stored in a central database and 2) users who log into a website and view these results by querying this database. BTW, I just figured out the mapping problem for the arrays. I did a mistake in defining the correct argument type. LabVIEW would not map an array defined as System.Array but if you define a double array, it would show the correct LabVIEW input. But now, after wiring a 2-D LabVIEW array to a 2-D array in .NET, I got a 1172 exception "Object cannot be stored in an array of this type". I will dig into this and if I dont get any positive result, I will post my VI. Any suggestions/comments are highly appreciated. Thanks, Srik Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.