LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV access to .net API

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?

0 Kudos
Message 1 of 7
(2,916 Views)

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.

0 Kudos
Message 2 of 7
(2,887 Views)

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.

 

Untitled.png

0 Kudos
Message 3 of 7
(2,882 Views)

Are the methods you're trying to access publically available?


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

0 Kudos
Message 4 of 7
(2,877 Views)

Well since they work fine from Python, I'd say yes.

0 Kudos
Message 5 of 7
(2,861 Views)

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.

constructor.PNGconstructor.PNG

 

 

0 Kudos
Message 6 of 7
(2,828 Views)

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.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 7 of 7
(2,812 Views)