VISA USB

While NI-VISA supports three types of USB pipes: control, bulk, and interrupt, Does it means we can develop any USB device driver upon this three types and need not any other low level layer knowledge? For example, if we write some raw data, we just use the bulk mode to write, and then the usb data out would output our written data.
Solved!
Go to Solution.

I don't understand your question.
VISA supports three of maximum 4 allowable different transfer mechanism available for USB.  Isochronous is not supported and is a lossy transfer which is not interesting for test and measurement anyway.  It is meant only for audio and video where a few lost packets are not so bad.
ALL USB devices can support ONLY these four types of transfer.  Note that this not describe WHAT should be transferred using these methods, only HOW the data is transferred.
Each device implements its own mix of commands which can be received either by control transfer (all devices support a certain set of commands on control endpoint zero for configuring the device), Bulk or Interrupt or a mixture of all three.
If a device does something different than is outlined in the USB protocol specification document then it is not USB conform.
Shane.
Say hello to my little friend.
RFC 2323 FHE-Compliant

Similar Messages

  • NI-VISA USB Devices

    I am having a couple of problems using a USB RAW device.  I have an interface module that has a PIC18F1450 micro to provide USB communications.  I used the driver wizard to configure it for LabVIEW.  The developer of the module provided a simple VB GUI, and after I used the wizard, the VB GUI could no longer see the module.  If I move it to a different USB port the VB GUI can see it, but LabVIEW can't.  Using a USB device monitor I see that when it is plugged into the port that it was in when I ran the wizard, it shows up as a NI-VISA USB Device.  When I plug it into another port it shows up as a USB Human Interface Device.  Why does the NI software have to change how the device registers in Windows?  Also, when I first connect the module and start my program, I typically have to try communicating with it a dozen times or so before I have any success.  After that, every attempt is successful.  Here is my communication code.
    Jim
    LV 2013
    Attachments:
    USBComm.png ‏28 KB

    The switch has to mostly with Windows device drviers. A device in Windows may only have one driver assigned to it. I have not seen the type of behaviour you are seeing where your device is exxentially locked to a specific port. We use VISA USB to communicate with printers all the time. What we have found is that once we assign the NI drvier, other tools that require a drvier can no longer communicate with the printer. Likewise if we install some other tool the NI VISA drivers can no longer communicate with the printer. We also use a .dll to effectively install the driver for the printer when it is first connected. This is the .dll example NI provided me when I was first getting this to work with our printers.
    We do a VISA resource lookup to get to the list of devices currently connected.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot
    Attachments:
    ForceINF.zip ‏1614 KB

  • Visa usb driver problem

    I have a usb controller that I want to communicate with labview....I have successfully made usb raw driver using driver development wizard...and it is running good in my pc in which NI labview is installed....now i want to run a labview application in a pc in which no labview(nothing related to NI) is installed ... so I copied the visa usb driver to that pc.....after connecting device and installing the driver it says cannot install driver completely...I have tried this with 2 pcs...so I was wondering apart from visa usb driver....is there something to install in a pc which is not having labview so that  it can communicate with pc ?
    Solved!
    Go to Solution.

    I have already installed the runtime engine, but that comes later...first it should be there at the device manager list but it has error symbol on my device...I think unless this driver is not properly installed device will not be recognised by labview application..

  • VISA USB Isochronou​s

    Having recently done some work with VISA USB communication, I was wondering if there are any plans to support Isochronous transfer in VISA?
    If so, when should it be available?
    If not, why not?  It's an important part of the USB Specification.
    Shane.
    Say hello to my little friend.
    RFC 2323 FHE-Compliant

    Hey Shane,
    Isochronous transfer does not guarantee data delivery. Data may be lost during the data transfer. In most scientific and engineering application, this is not a desirable situation. It is primarily used to transfer audio and video.
    We did not see a lot of demand to implement it. Of course, we are always open to suggestions. I would recommend you to fill out a product feedback on ni.com/contact.
    Regards,
    Song Du
    Systems Software
    National Instruments R&D

  • VISA : USB through PIC microcontoller, writing is good, but not reading

    Hi guys;
    I'm trying to put together a simple VISA USB read/write program to test communication from Labview to a PIC microcontroller.
    I've found an example on youtube and wanted to try to implement it.
    Well, in the owners video everything seems to work juste fine, but for me only the writing is working, I can't read data from the microcontroller.
    Can anybody explain to me what is going wrong on this ?
    Here is a the diagram.
    Thank you.

    Give this a try.
    You don't need to initialize the USB port every iteration of your loop.  Nor do you need to close it each time either.  Move those out of the loop.  I also greatly simplified the conversion of your data to write.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Attachments:
    USB Read and Write.png ‏25 KB

  • How to add visa usb support to the application builder?

    Is it possible to add VISA USB drivers to the application installer?
    www.xinstruments.com
    Custom Software for Industrial Automation
    www.hdrconverter.com
    Picture processing made easy

    I'm afraid you can't do that. The LabVIEW 7.0 application builder only supports adding the VISA serial port driver to the application builder installer.
    You will have to install the VISA support for USB separately by using the VISA 3.0 runtime installer.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • VISA USB not configuring correctly.

    I’ve used Labview in the past but I am no expert and often find myself going around in circles until I eventually find an answer!
    I have written software before that captures data using rs232 serial port. I now have a new device which uses USB. I’d like to put an option in so that I can simply click from USB to serial depending on what device is connected. I realised I will have to mask the strings coming out along with device options to make this work but that should be simple.
    The new device comes with basic software and has a Silabs Driver. So what I’ve done so far is;
    Located the VID and PID codes and confirmed they are correct when looking at the USB list within the driver wizard.
    Used the VISA driver wizard to create a new driver for my device and confirmed its installed within the device manager.
    Found an example which uses USB raw data control to try to get information from the machine but with no luck.
    Problems I am seeing on my PC
    A restart seems to lose the driver, or it takes a long time for it to show in device manager.
    The NI-VISA device in device manager disappears and then reappears as and when it pleases. Usually in 5 second intervals.
    The device is sometimes present in MAX, and sometimes not.
    When I look at VISA interactive control in MAX the USB device is sometimes there and some time not, a refresh sometimes helps.
    I get a bubble in the corner of XP screen saying there is a device malfunction but it disappears and everything goes back to normal.
    As I said I’m no expert and if you were able to give me some guidance on this, so I can communicate correctly I can get on with the rest of the project. It seems like the string has a time limit leaving the machine and the driver is only valid during this time period.
    OR, can i locate the orginal dll and control the device from the original software driver? If this is the best route, how do i locate the correct dll?
    Thanks

    Hi DelEngUK,
    I'm having a bit of a stab in the dar here but:
    It wouldn't be anything to do with your VID/PID combination not being unique? If the silicon labs driver is already installed, could there be a conflict if the Vendor ID and Product ID is the same for each?
    And just as a minor point: Windows ins't being clever and trying to disable your USB ports to be more power friendly is it? I've seen Windows doing this with USB scopes when there hasn't been communications over the port in a few minutes. this link addresses that issue in Windows XP:
    http://www.himsa.com/Support/NOAHlinkKnowledgebase/Howto/turnoffaUSBportspowersaveoption/tabid/492/l...
    I searched through our internal records of past problems, but I wasn't able to come up with anything immediately useful or similar sorry. I shall continue to look around though.
    Lets treat my post as a bit of a bump too. If anyone else out there can add their 2 cence then that would be great.
    Thanks!
    Rhys
    Applications Engineer
    National Instruments

  • NI VISA USB disconnect​ion events

    I am using NI VISA to control and acquire waveforms from a Tektronix oscilloscope in my application and so far everything works well but sometimes the USB connection can easily disconnect (and then connect immediately) and the MessagedBasedSession object then becomes invalid. My question is how can one setup events to know when a VISA device is connected and disconnected from an application so that these events can be captured and possibly notify the user or reconnect to the instrument. I know there are some functions such as Disable or Enable events but there are little documentation about these functions.
    Thank you.

    Hi falopsy!
    Thank you for contacting National Instruments.
    From what I understand of your problem you have a Tektronix scope connected to your computer via USB and you're communicating with it with the use of the VISA drivers. When the connection drops (briefly) and reconnects again, your MessageBasedSession expires and is no longer useful. I have found a few links that I think might help:
    Firstly, this method here simply detects an error; you can then notify the user of the error and ask them to reconnect.
    http://forums.ni.com/t5/LabVIEW/USB-Serial-VISA-pr​oblem-when-reset-happens/m-p/1442352
    You also mention VISA Events in your post, although I couldn't find a specific event for a connection drop I feel that it may still be of use:
    http://zone.ni.com/reference/en-XX/help/371361J-01​/lvinstio/visa_events/
    Lastly, I have attached an example VI of how to detect a serial break when transmitting data serially, this may also be of use.  It might also be a good idea to swap the USB cable in case this is causing the connection drop.
    I hope this helps! Let me know how these go and if there's anything else I can do - Have a great day!
    Max
    NOTE: If the attachement fails to open, it can be found in LabVIEW under Help>>Find Examples... and searching for "detect serial break".
    Attachments:
    Detect Serial Break Event.vi ‏35 KB

  • VISA USB Communication

    I'm in trouble trying to communicate a raw USB device trough VISA and CVI. I can easily connect and disconnect the device by using viOpen/viClose, but I don't know how to read/write data. Some functions like viWrite return this error: "Unable to start operation because setup is invalid (usually due to attributes being set to an inconsistent state)". Which are this attributes? Neither can use specific USB functions because USB constants seem to be undefined. So I suppose I'm skipping some steps... Any help??
    Thank you.

    Hi Dan,
    Thank you for your reply. Finally I've been able to communicate with my USB device, but I still have some troubles with it.
    The device at issue has the following structure:
    - 1 Bulk-out pipe (no problem with viWrite)
    - 1 Interrupt-in pipe that sends data every 0.3 sec aprox
    - 1 Interrupt-in pipe that only sends data when the device gets a signal from an infrared receiver
    I need to read the two interrupts simultaneously, and at the same time I need the first to be as fast and accurate as possible. I think the best option would be to use callbacks for both interrupts, so that it would only read when data existed. but I have a pair of impediments on the matter:
    - When I try to use viInstallHandler it returns me a general protection run-time
    error: Unknown source position, thread id 0x00....
    - I cannot set default interrupt-in pipe when USB Interrupt Event is already enabled, so it's impossible to read the two pipes at the same time althought I open a different visa session for each one. In this case if I change it before enabling events the setting is applied to both sessions.
    Seen the sight I suppose there isn't another way that to convert one of interrupt pipes into bulk.
    According to the properties of each one, which do you think that it would be the most optimal change?
    On the other hand I'd like to solve the problem with event handlers. Do you know how?
    Thanks a lot for your interest.

  • Visa usb bulk communication - multiple end points

    Hi All,
    I'm setting up an ocean optics USB2000+ spectrometer and would like to use visa instead of the dll I got with the spectrometer (I had a bunch of stability problems, its not supported anymore by ocean optics and I don't want to have to pay for the new version).  I have the documentation for the spectrometer and have been able to set the integration time and receive spectra as quickly as the dll was able to.  But I have not been able to read the calibration information from the spectrometer.  All commands use bulk transfer, so I'm using visa write and read to send/receive.  I think the difference between the spectral data and calibration data is that the data comes from different endpoints.   The spectrometer has 4 endpoint addresses (3 to the PC = IN, 1 from the PC = OUT).  The spectral data comes back on the first IN endpoint and the calibration data comes back on the 3rd IN.  
    Is there a setting I need to change to read from a different endpoint?  They are all bulk type according to the documentation.  Any suggestions would be much appreciated.
    thanks!
    Solved!
    Go to Solution.

    Hey gharris,
    It looks like there is a setting you can change through a property node that will change which endpoint you read from. If you're using a text-based program, the property you need to change is VI_ATTR_USB_BULK_IN_PIPE. If you're using LabVIEW, follow these steps :
    First, set a VISA property node down on your block diagram (really any property node will work). Next, right-click on the property node and select Select Class -> VISA -> I/O Session -> USB Raw. This step can be found in EndpointSS1.png attached below, and will change the property node to a USB Raw property node. Third, left-click on Property and select USB Settings -> Bulk-In Pipe. This step can be found in EndpointSS2.png, attached below. This is the property that sets which endpoint to read from. To change the value of this, right-click on the property node and select Change all to Write, which will allow you to wire in an endpoint value. 
    Justin E
    National Instruments R&D
    Attachments:
    EndpointSS1.PNG ‏24 KB
    EndpointSS2.PNG ‏15 KB

  • Has anyone used a USB device server with a DAQmx or NI-VISA USB device?

    Hi,
    I have an application where I need to communicate with USB devices (some through DAQmx, others through NI-VISA) that will be more than 15 feet away from the controlling PC.  I could use USB-ethernet-USB dongles, but I also see that there are USB-over-ethernet device servers available (like this one: http://www.usbgear.com/computer_cable_details.cfm?​sku=USBNET-400&cats=104&catid=187%2C188%2C104%2C65​...).  Has anyone used these or similar USB device servers successfully with LabVIEW?  
    Thanks,
    JasonP

    http://forums.ni.com/t5/Multifunction-DAQ/Does-NI-​offer-USB-extension-solutions/td-p/381873
    http://forums.ni.com/t5/Dynamic-Signal-Acquisition​/Using-a-quot-USB-2-0-extender-over-Cat-5-quot-to-​...
    http://forums.ni.com/t5/Multifunction-DAQ/Can-I-us​e-a-USB-Extender-with-USB-6008-or-cDAQ/td-p/920361
    Let me know if you have any more questions.
    Product Support Engineer
    National Instruments

  • Comunicati​ng with endpoint in VISA USB Driver

    Dear All,
    I am a new User of Labview ,
    I need to develope a Temprature Data Logger Software in LabView by using  Pico Technology Data Logger PT104  HW,
    it use endpoint  0x01 and 0x81 as command comunication and endpoint 0x82 as logging temperature data.
    Please Let me know How could I take stepping in VISA Driver and using in Labview ? 
    Best Regards.

    http://www.picotech.com/document/pdf/usbpt104pg.en​-3.pdf
    In this manual is the dll interface explained, so you don't need visa for a usb bus.
    How to interface to a dll is explained in the LabVIEW Help.
    greetings from the Netherlands

  • VISA usb, read problems

    Hello,
    I'm doing a project where Labview must communicate with a uC (microchip, mikroC PRO for PIC). Unfortunately, it doesn't work correct, sending data to the uC is good but cann't transmit data to the PC (Labview). The program remains in the loop "while (! HID_Write (& writebuff2, 64)). '
    For writing and reading, I use the example program "USB RAW - bulk.vi". If I 'pushed the Bulkin button then I get the following error welding "Error -1073807302 occurred at VISA Read in USB RAW - Bulk.vi" but if I click Bulk Out, then I receive data in the uC.
    Can someone help me maybe? thanks 
    Piece of uC code:
    unsigned char readbuff2[64] absolute 0x500;   // USB Buffers should be in USB RAM
    unsigned char writebuff2[64] absolute 0x540;  // USB Buffers should be in USB RAM
    void USB_enable()
      char cnt;
      HID_Enable(&readbuff2,&writebuff2);     
    void USB_Communication()
      char Read_Reg;
      if (HID_Read())
        switch (readbuff2[0])
          case Reg_Addr_Software_Version:      //read Software_Version
            writebuff2[0]= Reg_Addr_Software_Version;
            writebuff2[1]= Software_Revision_H;
            writebuff2[2]= Software_Revision_L;
            writebuff2[3]= 0;
            break;
          default:
            writebuff2[0]= Reg_Addr_Automatic_Response_Warning;
            writebuff2[1]= 0;
            writebuff2[2]= Address_Fail;
            writebuff2[3]= 0;
            break;
        while(!HID_Write(&writebuff2,64));
      } // end HID_Read()
    Solved!
    Go to Solution.

    Did you look at the links describing the solution?
    "Yes I solved the problem.
    I found the solution in this topic: http://forums.ni.com/t5/LabWindows-CVI/Control-PIC18F4550-via-USB-with-LabWindows-CVI/td-p/694804
    And see the solution in topic:
    http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/VISA-RAW-FOR-USB-USING-PIC18F4550/m-p/2064030...
    Regards,
    Ronald"
    He said: "The descriptor file (USBdsc.c) of MikroC Pro was not correct" and made some modificacations described in the forum post
    Taylor B.
    National Instruments

  • Installing VISA USB device under Linux

        Well, well, well... I've never though that such a time will come, but...
    Linux. The question is about it.
    It so happend that i need to install a custom made usb device under that OS. I've created the driver using NI-VISA driver development wizard and my device works fine under windows. But i don't know how to create a driver for Linux and how to install it there.  Any ideas? Any???
    www.xinstruments.com
    Custom Software for Industrial Automation
    www.hdrconverter.com
    Picture processing made easy

    Shawn B. wrote:
    > It looks like you are running Mandriva 2006 (as opposed to 10.0). 
    > The version of NI-KAL that shipped with NI-VISA 3.4 does not support
    > Mandriva 2006.  The good news is you can download a newer version
    > of NI-KAL that will install on Mandriva 2006 from:
    >
    > <a href="ftp://ftp.ni.com/support/kal/1.2/"
    > target="_blank">ftp://ftp.ni.com/support/kal/1.2/</a>
    >
    > Install NI-KAL then run updateNIDrivers.
    >
    > Shawn B.
    > National Instruments
    This is not exactly an enlightening answer for a typical Linux user. I too
    am having difficulty installing this under Debian Etch.
    Linux distributions are made of components, the name on the label is a
    little meaningless (in my years of experience with Linux, I am yet to find
    a single program that will compile with one distro but not another, given
    the same tools). So what components exactly does this driver depend upon ?
    What am I missing here ? Is it my custom kernel (this is a Debian Etch
    system) or some bug in the supplied drivers ?
    The installer identified the following :
    Checking required install tools...
    Checking installer tool versions...
    rpm 4.4.1 can be used with a default installation path
    tar 1.15.1
    Checking dependencies...
    glibc 2.3.5
    X /usr/X11R6/bin/X
    Terminal /usr/X11R6/bin/xterm
    Unpacking install files to /tmp/ni4882.install...
    My error messages :
    The following components, totalling 28444KB, have been selected
    for installation:
    LabVIEW 7.0 Run-Time Engine
    NI-PAL
    NI-KAL
    NI-488.2 Help
    NI-488.2 Utilities
    NI-488.2 Driver
    Continue? [Ynq] Y
    * NI-KAL 1.0.0f0 for Linux/x86
    This installer will install the NI software using the targz.
    This software is covered by the included license file (LICENSE.txt).
    By installing this software you are acknowledging acceptance of the
    terms of the license.
    The installation location for NI-KAL is /usr/local. A natinst/nikal
    subdirectory will be created at the specified location.
    Installing:
    NI-KAL => /usr/local/natinst/nikal
    Extracting /tmp/ni4882.install/kal/nikali-1.0.0-f0.tar.gz to /usr/local/...
    Checking required tools...
    Configuring for linux kernel version 2.6.14.3-raja.
    ********************************* NOTE *********************************
    Using kernel headers found in /lib/modules/2.6.14.3-raja/source.
    If this does not correspond to the location of the 2.6.14.3-raja headers,
    then define KERNELHEADERS in your environment to point to the location
    of the kernel headers, define KERNELTARGET as the version of the
    kernel for which to compile, and then rerun ./configure.
    ********************************* NOTE *********************************
    Kernel has reparent_to_init(): yes
    Number of arguments for do_munmap(): 3
    pte_offset function: pte_offset_kernel()
    Number of arguments for remap_page_range(): 4
    Kernel has get_user_pages(): yes
    Kernel exports get_user_pages(): yes
    USB altsetting name: cur_altsetting
    Kernel has usb_get_intf(): yes
    Kernel has intf_cache member in usb_host_config: yes
    Kernel exports usb_set_configuration(): no
    Kernel has usb_endpoint_running(): no
    Storing configuration in Makefile.in
    If the values stored are incorrect they can be changed before running make.
    Installing Kernel module...
    /bin/cp nikal.c objects/nikal.c
    /bin/cp nikal.h objects/nikal.h
    make -C /lib/modules/2.6.14.3-raja/source
    SUBDIRS=/usr/local/natinst/nikal/src/objects modules
    make[1]: Entering directory `/usr/src/linux-2.6.14.3'
    CC [M] /usr/local/natinst/nikal/src/objects/nikal.o
    In file included from /usr/local/natinst/nikal/src/objects/nikal.c:86:
    /usr/local/natinst/nikal/src/objects/nikal.h:172: warning: 'packed'
    attribute ignored
    /usr/local/natinst/nikal/src/objects/nikal.c: In function
    'nNIKAL100_vmaClose':
    /usr/local/natinst/nikal/src/objects/nikal.c:196: sorry, unimplemen

  • Trapping VISA USB to serial session error

    Hello,
    What would be the best way to trap a VISA error where someone disconnects a USB to serial Converter.
    At the moment I am looking at the error code and if it is -1073807194 The I break out and let the user reset the system.
    Is -1073807194 the only code that will indicate the USB bus was disconnected? Or are there a other codes that apply.
    Thanks
    Martin

    Martin__E wrote:
    Hello,
    What would be the best way to trap a VISA error where someone disconnects a USB to serial Converter.
    At the moment I am looking at the error code and if it is -1073807194 The I break out and let the user reset the system.
    Is -1073807194 the only code that will indicate the USB bus was disconnected? Or are there a other codes that apply.
    Thanks
    Martin
    Don't worry about trapping the error where someone disconnects a USB to serial Converter
    Trap the "Someone"!
    Place a "TEST in Progress - Do not disturb" Sign on the station, Post an armed guard! (with orders to shoot!)
    PROTECT your experiment's equipment set-up!  The alternative is to state, without ambiguity, the the contitions of your test could not be verified and the data, and any conclusions dranw from the data, have NO merit.  (Should be discarded without consideration)
    Yes, that is very blunt.   If you want to draw conclusions about something you "Test" the "Test enviornment" must be tracable and stable.  You CANNOT recover from an undocumented procedural violation easilly.  You can abort or fail a "Test" where procedures were not followed..... it is much harder to "Prove" that such a violation did not effect data integrity! 
    Jeff

Maybe you are looking for

  • IPhone's calendar week view error

    Hello guys. When i choose the week view on Calendar (IOS 7.03) the Day number marked is wrong. The number 29 is below "Q" when the correct is below "T". But the extense text below shows correct. Does it occurs with you?

  • [Solved] Screen lockup since xorg 1.6.3-4 upgrade (catalyst)

    Hey there, since i yesterday upgradet my system (pacman -Syu) and pacman installed a new xorg-server version (from 1.6.3-3 to 1.6.3-4) and xf86-inpud-evdev my screen gets completely locked up after i start GDM. Only thing that helps is to press the r

  • How to set initial size for mailbox in Exchange 2013?

    Hello All! I've installed Exchange 2013. Now I'd like to check Backup/Restore of some DataBase. For thist I look for some way to create Bulk of Mailboxes in DataBase and to set some initial size 50-100Mb for each. Thanks a lot! BR, Pavel

  • Reg. Process cost and raw material cost added

    Dear Friends Please consider our below scenario PO is created and stock is maintained in unrestricted (Raw material) and then Production order is created for Cut pcs and Raw material is issued to production order through 261 mvt type next Cut pcs is

  • Business Objects - Siebel Integration kit - Generate Query

    Hello Thank you for reading this post. I am designing reports using Crystal reports 2008 from Siebel CRM using the BO - Siebel integration kit. With the help of kit, all the business components (BC) of Siebel are exposed as tables in Crystal reports