12-05-2012 10:55 AM
I have an API with several .net assemblies.
With some of the assemblies I have no trouble instantiating the object (i.e. adding an constructor, invoke, property node) and using it.
With other asemblies from the same API, no matter what class I select, the class select dialog just disappears and the node is left empty (.ie. just says .net, rather than the .net being replaced by the class name.).
Since there is no message produced, I at loss as to how to trouble shoot.
(The class involved works fine from a Python script...)
Any ideas?
12-07-2012 09:16 AM
Hi MacDroid
Could you add some screen shoots in order to look for information?
Do you have these problems with some specific assemblies or is it randomly?
Regards
Esteban R.
12-07-2012 12:09 PM
It is a specific vender provided API: http://www.ti.com/tool/fusion_digital_power_api
Shown Below: the upper Invoke node shows what happens when you browse to the TIDP.SAA.SMBusAdapter class. THe node changes to SMBusAdapter. You can then select the Discover method.
The lower Invoke node shows what the node looks like before AND after clicking the OK button in the "Select Object From Assembly" dialog.
No error is thrown the dialog just disappears and the node does not change.
12-07-2012 12:15 PM
Are the methods you're trying to access publically available?
12-10-2012 07:06 AM
Well since they work fine from Python, I'd say yes.
12-12-2012 04:50 PM
Hi Macdroid
Not all the .NET objects can be use in LabVIEW. In order to create a .NET object on the block diagram it needs to have a constructor and the PMBusDevice does not have any constructor.
You can read more about this in the following links.
Creating .NET Objects on the Block Diagram
Which .NET Features Are Not Supported in LabVIEW?
Regards
Esteban R.
12-13-2012 02:14 AM - edited 12-13-2012 02:35 AM
As Esteban already explained there are some limitation in what you can call with the LabVIEW .Net nodes.
I suspect two possible issues here:
1) The object is really a static object and does not have any constructor at all. you should be able to simply place a property or method node down and select the object class directly and then the static methods and properties of that object.
2) The constructors makes use of generic datatypes. This can not really be supported by LabVIEW since LabVIEWs strictly typed datatype system makes that rather hard to do. Not only the technical part of programming it (I'm sure the LabVIEW programmers could do that) but more the configuration part that would have to be added to constructors and method nodes, and where the user would have to make rather involved configuration decisions.