LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TI USB-to-GPIO interface EVM adapter. Dll for Labview driver

Solved!
Go to solution
I am looking for way to send commands via Texas Instrument USB-to-GPIO using Labview. TI support only .dll file. No .h or .c file. So when I configure "Call Library Function Node" then .DLL is not enough. All nodes are closed.
0 Kudos
Message 1 of 15
(8,856 Views)
The .h file is only informational, though you could use it for the wizard that would create the VIs to access the functions in the DLL. You don't need it to call the DLL. The .c file is only necessary if you plan on changing the DLL, and unless TI distributes that... As for accessing the DLL, what do you mean by "all nodes are closed"? Is it a C or C++ DLL? Do you know the calling convention? Are you sure it's a DLL, and not, say, a .NET assembly? Do you have any documentation for it?
0 Kudos
Message 2 of 15
(8,845 Views)

As smercurio has explained the .h file is not really necessary and usually not even enough to interface fully to a DLL. You do need a good documentation for the DLL API. Failing such a documentation you can sometimes get away with the .h file only but it usually means quite a bit of trial and error.

 

But without documentation and .h file you are really out of luck. The only way to interface to such a DLL is by reverse engineering at least one caller and sometimes also the DLL itself. But this is in several juridications outright illegal and in most western countries at least vastly limited.

Message Edited by rolfk on 05-09-2010 09:20 PM
Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 15
(8,835 Views)

Can I use it in LabVIEW application if...

 

" This is a .NET and DLL and - as such - can be referenced by any .NET language in a solution (C#, VB.NET, etc.). It was written using MS Visual Studio 2005. To include it in your project, add the DLL as a reference for the project in a solution that access it."

 

 

sr.PNGWhy "function name" is disabled and no parameters in "Function Prototype"

 

I also tryed load dll via  Tools->Import->Shared Library but it requrie .dll and .h files.

 

 

0 Kudos
Message 4 of 15
(8,810 Views)
Because a .Net DLL does not export any functions. Instead it exports a .Net interface and you need to use the .Net Nodes in LabVIEW to interface it.
Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 15
(8,797 Views)

Waw. Can you hint or show me how could I do it?

 

I have no experance it .net

 

0 Kudos
Message 6 of 15
(8,788 Views)

There are examples that ship with LabVIEW on using .NET. There is also information in the LabVIEW Help under the Fundamentals -> Windows Connectivity topic.

 

If it's just an assembly that you have (as opposed to a .NET control) then you will need to use the constructor node to create an instance of the class, and then use the property and method nodes to manipulate your object. The .NET assembly should have come with documentation on how to use it. You basically need to look for example programs that TI would have provided and then do similar .NET operations in LabVIEW.

0 Kudos
Message 7 of 15
(8,784 Views)
Ok. thank you very much. At least I have got a way now where to move.
0 Kudos
Message 8 of 15
(8,776 Views)

Hi,

 

I begin build application, but when run it then error 1172 appears.

How I can define object?

 

"Error calling method USB_Adapter_Driver.USB_Adapter.setPullUps of NULL ObjectId, (System.ArgumentNullException: Key cannot be null.
Parameter name: key ) in HFE communication.vi"

 

D NET.JPG

0 Kudos
Message 9 of 15
(8,743 Views)

You need to open (instantiate) the .Net object before you can attempt to do anything on it. As it is now you try to operate on a NULL object meaning there is nothing to perform your methods on. Look at the .Net Constructor node.

 

Message Edited by rolfk on 05-11-2010 05:10 PM
Rolf Kalbermatter
My Blog
0 Kudos
Message 10 of 15
(8,736 Views)