LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ni-visa usb deivce for linux

i already control NI-VISA usb deivce in WINDOWS XP (i use ni-visa 4.0 and labview 7.1), but now, i can't control usb device use labview for linux(V8.2).
i use fedora core 7, install   ni-visa 4.2(for linux)  and  labview for linux(V8.2).
when i run "driver-wizard" in linux, i can't select USB hardware BUS, only select PXI/PXI options.
i get into linux text mode, and type   command :  lsusb , i can find my usb device(vid=0x10c4, pid=0xea61 at BUS 004, device 002)
how to do next step to control usb device with labview under linux?
0 Kudos
Message 1 of 5
(5,983 Views)
0 Kudos
Message 2 of 5
(5,955 Views)
 

4.1 Linux
NI-VISA relies on a Linux kernel feature for its USB support. This feature is called usbfs, and on older Linux kernels was referred to as usbdevfs. For NI-VISA to support USB devices, this feature must be present and mounted (like a virtual filesystem). This is supported in most major Linux distributions such as Red Hat, SuSE, and Mandrake. You may use the mount command to display what filesystems are currently mounted to see if your system currently supports this feature.

Also, the VISA user must have write access to the file that represents the USB device, which is typically somewhere in a subdirectory within /proc/bus/usb. If this is not the case, the USB device is not accessible by VISA (it will not be found using viFindRsrc, and viOpen will fail). The default configuration on most systems is that the root user has write access; however, no other user has this access.

There are several options for providing a nonroot user access to a USB device.

  • Use the hotplug package. This package is installed by default on most distributions including Red Hat, SuSE, and Mandrake. The hotplug package allows the user to run scripts for a specific USB device based on characteristics such as Vendor ID (VID) and Product ID (PID). If the hotplug package exists, the NI-VISA Installer by default will install scripts to give all users write access to all USB TMC devices and a framework for USB RAW devices. To add write permissions for a specific USB RAW device, run the included script:

    <VXIPNPPATH>/linux/NIvisa/USB/AddUsbRawPermissions.sh

    For more information about the hotplug package, refer to the following Web site: http://linux-hotplug.sourceforge.net/.
  • usbfs (formerly known as usbdevfs) may be mounted with the option devmode=0666. This gives all users read and write access to all USB devices.
  • The root user may add write permissions to the file that represents the USB device, which is typically somewhere in a subdirectory within /proc/bus/usb. Unfortunately, these permissions are lost if the device is unplugged. Therefore, this approach is not recommended.

4.2 Mac OS X

As long as no other driver on the system claims the USB device, you can use NI-VISA to access it. No special setup is required.
Related Links:
Product Reference: NI-VISA Help
Developer Zone: Using the VISA Driver Development Wizard and NI-VISA to Register-Level Program a PXI...
USB Implementers Forum: USB 2.0 Specification: http://www.usb.org/developers/docs
USB Implementers Forum: Approved Class Specification Documents: http://www.usb.org/developers/devcla...

117 評分 | 4.12 之 5
|

You can get the vendor ID and Product ID
In device manager view devices by connection and find the USB connections. Browse through all the hubs until you find your instrument then go to the properties. This is hidden in the normal view
- Jul 19, 2007

Each USB device has its own command set. You can use NI-VISA Read and Write functions to send these commands to an instrument and read the response from an instrument. This is great But what if you vendor does not have this or does not want to give to you Check with your instrument manufacturer for a list of valid commands for your instrument. Is there a function that would list commands or a set of standard calls that would be a start
- Jan 26, 2007

isochronus enpoints
what about isochronus endpoints? can't we read in isochronus mode?
- May 26, 2006

NI_Visa users manual out of date
NI VISA Users manual is version 2.x (2001) and does not contain programming examples for USB connection. Current NI VISA is 3.x
- charles dansreau, CYMER. cdansreau@cymer.com - Mar 14, 2006

It's a start.
Like other comments, USB vendor ID and product ID for NI are identified but the world is bigger then that. Should you not be able to get the same information from the "Device Manager"
- Aug 17, 2005

Full example for FX2 USB device
The document is good, but need to be update; I am able to put online one update for this document. The purpose of my document is show how to make the interface with the cypress FX2 USB device. If some person explain mi how to put this update in this web I will put it. Thank you for the help that I found in this document Thak you for the help that i found in this document
- Raul Arteche Diaz, CEADEN. artechedi@yahoo.com - Jul 25, 2005

RAW-USB-Devices and Linux ??
Nice document... But what about people not using Windows but Linux ??? How do they get a RAW USB Device ready to work with Labview under Linux?
- Holger Wolter, Universitaet Bochum. wolter@aept.ruhr-uni-bochum.de - Apr 15, 2005

This document needs to tell you how to get the product ID and vendor ID
- Aug 23, 2004

Vendor/Product ID
It will be good if NI can keep a database of the various vendors and products ID that uses USB interface.
- Nov 21, 2003

 

合法
此教學由美商國家儀器 (以下簡稱 NI) 開發。此教學受 NI 技術支援,但未經完整測試及檢驗。NI 不保證品質,亦不為其更新版本、相關產品及驅動程式等後續支援負責。此教學不具任何形式保證,且不受任何特定用途規範。(http://ni.com/legal/termsofuse/unitedstates/us/)

0 Kudos
Message 3 of 5
(5,954 Views)
 

sorry, i am very silly.

i already  read   https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x1qzCAA&l=en-US#toc3

but i still to not understanad how to do it?

i chang /etc/fstab  and add "none /proc/bus/usb usbdfs auto,devmode=0666 0 0"  and restart PC.

How do i  get a RAW USB Device ready to work with Labview under Linux?

please step by step teach me, thank you vary much!

0 Kudos
Message 4 of 5
(5,943 Views)
您可以從NI-VISA 4.2 for linux的下載網頁上知道它的spec: 
它並不支援 fedora core 7,
因此沒辦法使用,如果您想要在linux下使用NI-VISA,請您去灌NI-VISA 4.2所支援的linux,謝謝!
0 Kudos
Message 5 of 5
(5,926 Views)