Jump to content

Problem mapping .NET array (System.Array) with Lab


Recommended Posts

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

Link to comment
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.

Link to comment

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.