LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

please help USB driver using VISA only - without making windows driver

Hi,
 
I want to make driver for USB device (32 channel DAQ)using NI-VISA only, without making drivers for windows.
 
Is it possible to make such a driver??
 
 
-- MIhir
0 Kudos
Message 1 of 7
(2,948 Views)

Hi,

Thanks for your response.

As VISA is an API. It should be calling some windows function or it requires windows driver(for third party USB) to communicate with instrument. 

so i would like to know that , how it is communicating with third party USB device without having windows driver?

Again i would like to know that is it possible to make driver using NI-VISA only?? without having windows driver for that device.

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


@dilchahta wrote:

Hi,

Thanks for your response.

As VISA is an API. It should be calling some windows function or it requires windows driver(for third party USB) to communicate with instrument. 

so i would like to know that , how it is communicating with third party USB device without having windows driver?

Again i would like to know that is it possible to make driver using NI-VISA only?? without having windows driver for that device.


VISA uses Windows drivers to access the USB hubs. And it comes with its own implementation of a T&M USB device class driver. Unless you want to access a T&M device class (which given your hardware might be possible but it is a class profile that must be implemented specifically by the device firmware) you will have to resolve to accessing your USB device on raw level. This means VISA will give you communication channels to the actual USB endpoints and all the rest is up to you:

1) How to format the data streams
2) How to bitpack and unpack the data transfered!
3) How to react to USB events (interrupts)

All in all a lot of nitty gritty type of work but it can be done. If however the nomenclature used here nor in the great references Dennis has pointed out to you mean much to you you will have to do a lot (and I mean really a lot) of learning. First starting point would be www.usb.org. There are many documents describing various aspects of USB communication and how it all is supposed to work. Next step would be to go through the tutrorial and thread pointed out to you by Dennis. Then you will need the protocol documentation for your device in question and start to program away.

Don't expect anyone to do this work for you. Most people here couldn't care less about creating an USB driver themselves, being happy that it usually just works and those who do and do know how will typically be swamped with so much work that they won't be able to take of a few days to make it work for you. That is unless you want to pay for this work to be done 🙂

Rolf Kalbermatter
Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 7
(2,904 Views)

Hi,

Thanks a bunch.. That was really satisfactory reply.. I have gone through the documents u have suggested.

Actually, I am having a client, who has a 32 channel usb device. He wants a labview driver for his device and also wants an application where he can monitor the data from USB.

so my question is that, can i do the following things using labview only..

1) How to format the data streams
2) How to bitpack and unpack the data transfered!
3) How to react to USB events (interrupts)

Or i will required to develop some code for windows also.

What i am thinking is that, If i am having access to my device (by using MAX , NI-VISA and NI-DAQ ) then it should be possible to get control of the device in labview.  So there is not to do with coding for windows.

Can you please tell me what is the best way to create driver?? Using NI-VISA functions only or by creating the driver in windows and just add the conrol in labview using .dll or active X??

 

0 Kudos
Message 5 of 7
(2,878 Views)
I don't know if there is a 'best' way. You have to consider how the device will be used, who will use it, and your programming experience. If the device is intended to be used only by LabVIEW and you are an experienced LabVIEW programmer, then you can do all you want with just VISA. If the device is to be used with other program languages, then you would probably have to build the LabVIEW driver into a dll and in order to run it, also provide the LabVIEW run-time and NI-VISA run-time. The addition of the run-times may have some licensing issues (I think you will have to pay a license fee for VISA). It will certainly affect the size of the distributable (quite large). Using a more traditional approach and creating a driver with C/C++ will probably make the hardware easier to use in a larger number of environments.
0 Kudos
Message 6 of 7
(2,875 Views)


@dilchahta wrote:

Hi,

Thanks a bunch.. That was really satisfactory reply.. I have gone through the documents u have suggested.

Actually, I am having a client, who has a 32 channel usb device. He wants a labview driver for his device and also wants an application where he can monitor the data from USB.

so my question is that, can i do the following things using labview only..

1) How to format the data streams
2) How to bitpack and unpack the data transfered!
3) How to react to USB events (interrupts)

Or i will required to develop some code for windows also.

What i am thinking is that, If i am having access to my device (by using MAX , NI-VISA and NI-DAQ ) then it should be possible to get control of the device in labview.  So there is not to do with coding for windows.

Can you please tell me what is the best way to create driver?? Using NI-VISA functions only or by creating the driver in windows and just add the conrol in labview using .dll or active X??


I can't add much to what Dennis said. Just a few side marks.

First if it is a USB DAQ device, what make and model is it? Unless it is a selfmade device I can't really believe that it wouldn't come with a Windows driver already. Then accessing that Windows driver through the Call Library Node would be by far the easiest solution provided you know at least some basic C programming concerning datatypes and such. Without this same knowledge you won't be able to tackle steps 1) to 3) in a LAbVIEW-VISA driver only either.

NI-DAQ is specifically a (legac) driver for National Instruments DAQ devices. It probably won't do you any good to try to use it in any way for your device. That is unless we are talking all the time about an NI DAQ device in which case you would been having walked down the route around the globe to visit your neighbour one street away from you.

Rolf Kalbermatter
Rolf Kalbermatter
My Blog
0 Kudos
Message 7 of 7
(2,865 Views)