LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing USB in Labwindows

Hi frens,
 
Currently on a project:
 
-Can I actually interface usb in labwindows? it seems that labview is more usb friendly than labwindows.
Meaning
 
-I may have heard that the only way is to use activeX. Any views?
 
Anyone knows where to get more info on this?
0 Kudos
Message 1 of 10
(5,812 Views)

Hi frens,

Does the VISA library in labwindows support usb?

Rgds,

Jason

0 Kudos
Message 2 of 10
(5,807 Views)
Hi Jason,

NI-VISA supports most USB interfaces, depending on the class.  As long as you can get the device detected and showing up in MAX (Measurement & Automation Explorer) then you will be able to use it in CVI.  Check out this tutorial on our site to get started.

Please let me know if you run into any issues.

Thanks,
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 3 of 10
(5,759 Views)
Hi Robert,
 
Just want to clarify more:
1. The driver development wizard will enable me to develop a driver for my usb device, after which MAX will be able to detect it?
2. I do not have this device's DLL, any suggestions? Does it mean I do not have this device's usb command set?
 
Thanx agn.
0 Kudos
Message 4 of 10
(5,742 Views)
Hi Jason,

What USB class is your device?  You only want to use the driver development wizard if it is a USB RAW device (meaning it has no class).  If it is a USBTMC (Test & Measurement Class) then it will automatically show up in MAX.  No other classes are supported by NI-VISA.

A device's DLL is part of its driver.  If you are using NI-VISA then NI-VISA is the driver and you shouldn't have the manufacturer's driver installed.  You will, however, need to know what commands to send to the device if it is RAW and you use NI-VISA as the driver.
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 5 of 10
(5,710 Views)
-So can I say that I do not need the DLL at all if it is a RAW device? All I need to know is the command set(device)? But doesn't the command set come from the DLL?
 
-Can DLL written in labview be used in CVI?
 
Rgds,
jason 
0 Kudos
Message 6 of 10
(5,686 Views)
Jason,

You do not need the DLL if it is a RAW device.  Answering your second question depends on what you mean by "command set".  See the KnowledgeBase How Can I Communicate With a Device Using NI-VISA USB RAW Mode? for more reference material.  You will need to know what "pipes" or "endpoints" to write to and read from for the device.  The DLL does this as well and probably exposes certain abstracted functions.  You will have to do this yourself if you use NI-VISA as the driver.

Yes, a LabVIEW DLL can be used in CVI.
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 7 of 10
(5,672 Views)
Hi,
 
Is it possible to convert my projects in CVI into labview?
0 Kudos
Message 8 of 10
(5,624 Views)
Hi,
 
I need some directional help. Presently what I have are compiled dlls available in VB, VC++ and LV for a mini usb driver. (Source code not available.) However my program was built with CVI.
 
1. At present I'm trying to get a device to be read by my workstation, hence requiring this mini usb driver. However due to the abovementioned problem, is it possible to use these dlls in CVI?
 
2. My main objective is to get my instrument to read data out from this device, afterwhich modify and write back into it.
 
Thanks alot.

Message Edited by kingkong on 03-20-2006 09:16 PM

0 Kudos
Message 9 of 10
(5,620 Views)

Hi kingkong,

Yes you can use those DLLs in LabWindows/CVI.  There is a  lot of information about incorporating DLLs into CVI in the KnowledgeBases and discussion forums.  Check out KnowledgeBase 23L9A9XL: How Do I Call a Visual Basic DLL from LabWindows/CVI?.  There is a discussion forum post about using Visual C in CVI here:  http://forums.ni.com/ni/board/message?board.id=180&message.id=721&requireLogin=False and another one here:  http://forums.ni.com/ni/board/message?board.id=180&message.id=1596&requireLogin=False.

Finally, here's KB 3337DOV4:  Calling a LabVIEW DLL from a CVI or other C/C++ project.

Hope this helps!
Megan B.
National Instruments

 

0 Kudos
Message 10 of 10
(5,580 Views)