LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

> Related links

Visit our LabVIEW Wiki Hardware Portal


Tags
(This content has not been tagged yet)
 
Reply to this topic Start new topic
> USB in Labview 6
DrTrey
post Jun 30 2008, 08:41 PM
Post #1


One hit wonder!


Member
Posts: 1
Joined: 30-June 08
Member No.: 11882
Using LabVIEW Since:1994
LV:6.0 ,. ,.
Nothing Selected Nothing Selected Nothing Selected


I am looking for someone who has made Labview 6i work with a USB device. I am building a USB device and I have Labview 6 on hand and hate to buy the upgrade. Can anyone help?
DrTrey


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ad
post Jun 30 2008, 08:41 PM
Post #















Tags
(This content has not been tagged yet)
Go to the top of the page
Quote Post
hooovahh
post Jul 2 2008, 06:24 PM
Post #2


Very Active
***

V I Engineering, Inc.
Posts: 89
Joined: 26-October 06
Member No.: 6627
Using LabVIEW Since:2004
LV:8.5 ,8.0.1 ,7.1.1
United States Nothing Selected Nothing Selected


Wow I don't think I can help but could you clarify a little please.

QUOTE
I am looking for someone who has made Labview 6i work with a USB device.

Do you mean, have LabVIEW interact with a USB device? What kind of USB device, USB camera, NI-USB DAQ device? USB thumb drive?

Do you mean running LabVIEW from the USB drive? Do you mean as a development system? Do you mean running a LabVIEW executable? Do I ask too many questions?

--------------------
"When I look at the smiles on all the children's faces, I just know they're about to jab me with something."
"Oh, people can come up with statistics to prove anything, 14% of people know that."
"If you really want something in this life, you have to work for it - Now quiet, they're about to announce the lottery numbers!"
"Weaseling out of things is important to learn. It's what separates us from the animals ... except the weasel."


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
rolfk
post Jul 14 2008, 05:53 PM
Post #3


<customize this text>
*****

Premium Member
Posts: 1012
Joined: 9-April 04
From: Rotterdam
Member No.: 349
Using LabVIEW Since:1992
LV:8.5.1 ,8.2.1 ,7.1.1
Netherlands Switzerland Nothing Selected


QUOTE (DrTrey @ Jun 30 2008, 04:41 PM) *
I am looking for someone who has made Labview 6i work with a USB device. I am building a USB device and I have Labview 6 on hand and hate to buy the upgrade. Can anyone help?
DrTrey


You give indeed to little information about the type of device and such. If it is some DAQ device or similar however the standard mode of operation is to write a device driver and the according user space DLL wrapper. That can be easily imported into LabVIEW through the call Library Node in a way that is completely independant of the LabVIEW version.

Other means would be to use libusb to control your device. Interfacing LabVIEW to libusb through the Call Library Node is about the same in terms of version dependance but the libusb API is not really meant to be interfaced by high level applications like LabVIEW or VB and you will run in some issues that are usually most easily solved by writing a wrapper DLL that translates between the low level API and the LabVIEW Call library Node.

Last but not least there is USB Raw device support in NI-VISA. Not sure though from which version of LabVIEW this VISA feature is properly supported. While the feature is completely implemented in VISA, LabVIEW needs to support some extra API access modes to use this feature. A quick look in LabVIEW 6.0 shows that the necessary Nodes to use USB through VISA are not present. LabVIEW 6.1 is the first to support this interface but you will need a recent version of VISA installed on your computer. The first VISA versions had lot's of difficulties supporting USB device RAW access.

Princiapially option 1 will require you to really write C code. The other two options won't but can't be really considered a lot easier. You will simply implement the bit level protocol of your USB device in LabVIEW itself. Option two will still require some serious C knowledge to be able to properly interface to libusb through the Call Library Node. From that perspective using VISA to control your USB device would be probably the simplest solution but don't expect it to be trivial. One disadvantage of the two last options will be that you can't really leverage off that solution for non-LabVIEW users such as Visual Basic, Visual C, etc.

Rolf Kalbermatter


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
neB
post Jul 14 2008, 06:40 PM
Post #4


Certified Kool-Aid Kid
*****

Premium Member
Posts: 1161
Joined: 6-December 02
From: Pittsburgh PA USA
Member No.: 29
Using LabVIEW Since:1998
LV:7.1 ,. ,.
United States Germany Nothing Selected


QUOTE (rolfk @ Jul 14 2008, 01:53 PM) *
You give indeed to little information about the type of device and such. If it is some DAQ device or similar however the standard mode of operation is to write a device driver and the according user space DLL wrapper. That can be easily imported into LabVIEW through the call Library Node in a way that is completely independant of the LabVIEW version.

Other means would be to use libusb to control your device. Interfacing LabVIEW to libusb through the Call Library Node is about the same in terms of version dependance but the libusb API is not really meant to be interfaced by high level applications like LabVIEW or VB and you will run in some issues that are usually most easily solved by writing a wrapper DLL that translates between the low level API and the LabVIEW Call library Node.

Last but not least there is USB Raw device support in NI-VISA. Not sure though from which version of LabVIEW this VISA feature is properly supported. While the feature is completely implemented in VISA, LabVIEW needs to support some extra API access modes to use this feature. A quick look in LabVIEW 6.0 shows that the necessary Nodes to use USB through VISA are not present. LabVIEW 6.1 is the first to support this interface but you will need a recent version of VISA installed on your computer. The first VISA versions had lot's of difficulties supporting USB device RAW access.

Princiapially option 1 will require you to really write C code. The other two options won't but can't be really considered a lot easier. You will simply implement the bit level protocol of your USB device in LabVIEW itself. Option two will still require some serious C knowledge to be able to properly interface to libusb through the Call Library Node. From that perspective using VISA to control your USB device would be probably the simplest solution but don't expect it to be trivial. One disadvantage of the two last options will be that you can't really leverage off that solution for non-LabVIEW users such as Visual Basic, Visual C, etc.

Rolf Kalbermatter


Excellent reply Rolf!

I had to reply because I justread this Nugget (on the Dark-Side) by Shane where he introduces us to using VISA to interact with USB devices. I would have remained silent if the timing was not what it was.

Ben


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic

 




Time is now: 3rd December 2008 - 08:52 AM