LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView and 3rd party USB

Hello,

 

I am working on the evaluation board which is connected to the computer via USB port , There is a programing interface for this evaluation board in VB but in that I can just adjust the upper and lower limits (e.g for the input voltage),

I want to interface that evaluation board with the LabView, as far as I know the drivers of my evaluation board is not compatible for the Labview so if some body have some written "drivers" to communicate with 3rd party USB hardwares(software) with labview ? I shall be thanksfull if you will help me in this way.

or if you can send me some tutorial or examples explaning how to interface any 3rd party hardware with labview. 

 

thanks

0 Kudos
Message 1 of 49
(4,131 Views)

There are no drivers to communicate with 3rd party USB hardware since each hardware is different. You should check to see if the VB code is using a DLL. If so, then you should be able to call this DLL from LabVIEW. If they are instead using low-level USB calls then you're in for some pain.

 

As for a tutorial, your best bet is to start here and here.  A search will yield lots more results.

Message 2 of 49
(4,122 Views)

Hello Smercurio_fc

 

Thanks you for the Reply ,

and yes as you said that VB code is using the DLL, but can you please quide me how can I call that DLL from Labview as I am very new in using the Labview,

 

and it will be great help if you can guide me how to exicute the labview files in matlab ,

Thanks again

 🙂

 

 

0 Kudos
Message 3 of 49
(4,115 Views)

Mubi wrote:

and yes as you said that VB code is using the DLL, but can you please quide me how can I call that DLL from Labview as I am very new in using the Labview,


The LabVIEW Help and the search bar are incredibly useful tools. There's a chapter in the LabVIEW Help on calling code from text based languages. There are also a number of articles on this site. There's also an example that ships with LabVIEW. Open the Example Finder and search for "dll". 

 

 


and it will be great help if you can guide me how to exicute the labview files in matlab ,
Continued in your other thread. Let's keep the discussions separate so things don't get confusing.
Message Edited by smercurio_fc on 08-14-2009 02:37 PM
Message 4 of 49
(4,101 Views)

Hello ,

 

can you tell me that what is the difference between communicating with the 3rd party USB hardware through NI-VISA and to call the ".DLL " from labview.

 

I mean if I can be able to communicate with my 3rd party USB using the NI-VISA then will I be able to access my USB hard ware from labview as well?

0 Kudos
Message 5 of 49
(4,028 Views)

It depends.

 

If the hardware doed anything with Isochronous endpoints, the VISA won't do because it doesn't support Isochronous transfers.

 

I've also yet been unable to work out how to deal with composite devices under VISA.

 

With those two caveats observed, VISA should be able to do it but you WILL need some kind of documentation regarding the commands being sent and the data being received.  Otherwise the USB-snooping can be quite tedious.

 

Shane.

0 Kudos
Message 6 of 49
(4,024 Views)

Actually I can explain my problem as ,

The hardware(USB-hardware) which I am using has already  a user interface which is in VB and I want to use the parameters of that interface in the Labview. This is my basic problem in simple. so I was wondering

1)- If I will use the NI-VISA api to communicate with my USB-hardware then will I be able to access that parametrs of the VB-code from labview ?

2)- what can be the difference in accessing the .DLL file of the VB code from LabView  or to accessing the hardware by using NI-VISA

3)- which possibly can be the best way to achieve my goal ?

 

I will appretiate if I will get help in this matter .

Mubi

 

 

 

0 Kudos
Message 7 of 49
(4,007 Views)

Mubi wrote:

Actually I can explain my problem as ,

The hardware(USB-hardware) which I am using has already  a user interface which is in VB and I want to use the parameters of that interface in the Labview. This is my basic problem in simple. so I was wondering

1)- If I will use the NI-VISA api to communicate with my USB-hardware then will I be able to access that parametrs of the VB-code from labview ?


You're confusing technologies and programming environments. The VB code, based on what you're saying, accesses a DLL. VISA does not have the capability to access this DLL or the VB code. If you want to access the DLL directly then you need to use the Call Library Function Node. There are several Knowledge Base articles that discuss how to call code from text-based languages. Do a search and you will find them. There's even a chapter in the LabVIEW Help. Open the book and read. There's also an example that ships with LabVIEW. Open the Example Finder and search for "dll".

 


Mubi wrote:

2)- what can be the difference in accessing the .DLL file of the VB code from LabView  or to accessing the hardware by using NI-VISA


The difference is that for the DLL you need to use the Call Library Function Node. For VISA you need a driver, or you have to write your own. 

 


3)- which possibly can be the best way to achieve my goal


Depends on your programming skills. Since you already have VB code that presumably uses a DLL, then to me the easiest solution is to call the DLL from LabVIEW. If the DLL uses complicated input/output parameters then you can write a wrapper DLL that simplifies the datatypes so they are more amenable to LabVIEW. 

 

Unfortunately, we can only answer in general terms, as we have not seen this VB code, or this DLL, or know what it is you're trying to talk to.

 

 

0 Kudos
Message 8 of 49
(3,990 Views)

This may sound over-simplified but I think it's quite a simple answer:

 

If you want to use the code in the DLL, then you're going to have to USE the DLL.

 

VISA is an ALTERNATIVE to the DLL, so if you need the DLL (or the user interface within it), you don't need VISA.

 

Shane.

0 Kudos
Message 9 of 49
(3,984 Views)

Thanks you so much, I think what ever you already told me will be benificial for me. now I will try call the .dll file , 🙂

0 Kudos
Message 10 of 49
(3,983 Views)