LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView and 3rd party USB

Hello,

 

As now I want to communicate with the POL (point of load) which is mounted on my evaluation board (3rd party Hardware) and this evaluation board is connected to the computer via USB port

I want to communicate with that POL via PMBus and I have a dll file in which the function is written for commnication of computer(a user interface developed in some programing language) and POL via PMBus.

 

My problem:

My problem is to call that dll file in Labview but as far as I searched we have to have some information like the header file (*.h) or the function prototype of the function we want to call, or the documentation which normaly come with that dll file but in my case I dont have anything like that, what I have is just the DLL file.

 

Question:

 

1)- Is it possible to call any dll without this information mentioned above and access the functions in that dll ?

2)- Is it possible to extract the information which we need from the dll files directly?

2)- Or if some one can give me some other idea about how can I do that specificaly or how can I acheive my goal    even if it is possible to do it in some other way? I shall really appreciate that

 

best Regards

0 Kudos
Message 11 of 49
(2,149 Views)
No, you need the header file at a minimum so you know what the arguments to the functions are. Sometimes arguments can be custom types.
0 Kudos
Message 12 of 49
(2,138 Views)

You might also want to use the Import DLL tool -- it's incredibly useful.  I use it all the time because we are developing a DLL that communicates with a device over USB.  (Sound familiar?).  It does a lot of the work for you.

 

Incidentally, we are working on making our device USBTMC compatible -- which means changing the firmware on the device so it will be VISA compatible.

-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 13 of 49
(2,127 Views)

MattBradley wrote:

You might also want to use the Import DLL tool -- it's incredibly useful. 


Not without a header file it's not. Smiley Wink

0 Kudos
Message 14 of 49
(2,124 Views)

OK,

 

You might also want to use the import DLL tool AFTER YOU FIND THE HEADER FILE -- it's incredibly useful.

 

🙂

-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 15 of 49
(2,118 Views)

Hi 

 

Previously you said that you had a VB code that makes calls to the DLL. Would it be possible to extract the calls you need from that code?

 

Regards

 

David

NISW

0 Kudos
Message 16 of 49
(2,104 Views)

I had discussed this as well, but I think that has gotten lost in the discussion.

 

To OP: If the example code you received from the vendor is not too big, and if it can be uploaded then you can upload it and someone may be able to help you with this. Please be sure to include the DLL. Please be aware that if you had to pay for this (some vendors charge for a software development kit) then you should not upload the code, as that would be illegal. 

0 Kudos
Message 17 of 49
(2,092 Views)

Hello MattBradely,

 

As you wrote that you are developing some kind of DLL that communicate with the devices over USB, can you explain a little which kind of DLL you want to develop I mean will it be able to communicate with all kind of devices over usb? e.g. even in my case?

0 Kudos
Message 18 of 49
(2,080 Views)

No, it won't be able to talk to all kinds -- just the device in question.

 

There are different types of USB.  If you have a device that is USBTMC compatible, you can use NI-VISA to talk to it.  If you don't (which is usually the case when you are using a DLL), then the communication method is specific to each device.  In other words, you have to write software for each device to handle the communication.

-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 19 of 49
(2,072 Views)

Hello ,

How can I know that if my Device is USBTMC? and in case If my device is USBTMC then I have to use the NI-VISA or even then I can call the DLL (I am taking it like If some one have the USBTMC device they will have to use NI-VISA and if some one dont have the USBTMC then they have to call the DLL for communication) ? Rightnow I will not ask about writing the Software for device for communication because I am not on that stage till now.

 

Thanks,

0 Kudos
Message 20 of 49
(2,062 Views)