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

Similar Messages

  • Verbose boot stuck at - USB caused wake event (EHCI)

    I've been having problems booting my mac mini for a while. i thought I resolved the issue by re-installing the mini from the boot disks but after trying to upgrade to Leopard its now stuck one more time at the grey apple logo.
    Booting in verbose mode everything stops at
    Wating on <dict ID="0"><key>IOProviderClass</key><string ID="1">IOResources</string><key>IOResourceMatch</key><string ID="2">boot-uuid-media</string></dict>
    USB caused wake event (EHCI)
    any thoughts on where I should go from here? Is it a visit straight to a "genius"?
    thanks everyone

    I've been having problems booting my mac mini for a while. i thought I resolved the issue by re-installing the mini from the boot disks but after trying to upgrade to Leopard its now stuck one more time at the grey apple logo.
    Booting in verbose mode everything stops at
    Wating on <dict ID="0"><key>IOProviderClass</key><string ID="1">IOResources</string><key>IOResourceMatch</key><string ID="2">boot-uuid-media</string></dict>
    USB caused wake event (EHCI)
    any thoughts on where I should go from here? Is it a visit straight to a "genius"?
    thanks everyone

  • Usb interrupt timeout event handling

    Hi all,
    I am new to labview, I am doing PIC and PC USB data transfer. I am wondering is there any way I can handle the timeout event generated by "VISA wait on Event" VI, so that when there is no coming data within certain time, it would continue proccess other code rather than generate a error. I am thinking of why VISA USB intterupt has a timeout. Interrupt can only be trigger whenever it is requested, any method to link a USB interrupt event to EVENT Structure rather than polling, which makes more sense to me.
    Thanks & Regards
    Solved!
    Go to Solution.

    Yeah, sorry for being so cryptic.
    I indeed meant the USB nuggets linked to in my signature.  I assumed once I had mentioned it they would be found.......  Sorry.
    You should find an example of using Interrupt functions in there.
    Shane.
    Say hello to my little friend.
    RFC 2323 FHE-Compliant

  • Ipod lights up but is not recognized by computer  will die if usb disconnected

    My 5th gen. ipod recently stopped being recognized by my computer. I use a USB cable and when unit and computer are connected the ipod screen lights up and then goes dark.  The ipod click wheel and button do not work even when the screen is up (shows menu).  If usb disconnects the unit immediately goes dark. Any thoughts?

    That's usually a good indication that your iPod battery's is shot and in need of a replacement.  If you'd like, Apple can swap out the battery for a flat fee.
    http://support.apple.com/kb/index?page=servicefaq&geo=United_States&product=ipod
    Otherwise, you can also send it to a third party repair service center that could do the same job for a little less. Google "ipod battery replacement" for different options.
    B-rock

  • Lumia 620 usb disconnection problem

    Hi. Am facing a problem of usb disconnection while transferring data from my laptop. It's good for 1 or 2 minutes, after that am getting device not available on my laptop.
    Also I noticed the charging symbol on battery is blinking when connected to usb, but ok when connected to power cord. Is that blinking normal?
    clarify please

    The blinking is not normal.  I haven't run across any bad USB cable problems on Nokia phones but there have been some HTC USB cables that work to charge but not fot the PC connection. If you have another similar USB cable try it. Try other PC usb ports also

  • 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

  • IF firmware updating... USB disconnected -.-"

    Hi, i wonder if firmware updating in the half way, USB is disconnected...
    what i heard, it will cause damage to the phone.
    It's the phone will unable to boot up or unable to switch on anymore?
    if so, is that a way to fixing it by ourselves or just have to buy a new phone??
    Because i will update my firmware when the latest version is release.

    sorry to ask 1 more
    If it success getting the "Formatting"
    mean the phone is rescue from the DEAD OF USB Disconnect?
    i assume the next step... (after format done)
    run the Nokia Software Updater, to re-updating the Firmware.
    Am i correct? O.o

  • [solved-ish] random usb disconnect

    Hi
    There's a first time for everything and today that seems to be a random USB disconnect.
    So my USB dongle was disconnected and wouldn't reconnect when replugged.
    Does this error message mean anything or should I be looking elsewhere to try and find the cause of the failure? Google hasn't turned up much of use and didn't see much on the forums here either.
    Jul 1 18:18:53 localhost kernel: [193128.074045] usb 2-5: USB disconnect, device number 3
    Jul 1 18:18:53 localhost kernel: [193128.074211] rtusb_disconnect: unregister usbnet usb-0000:00:1d.7-5
    Jul 1 18:18:53 localhost kernel: [193128.074216] RtmpOSNetDevDetach(): RtmpOSNetDeviceDetach(), dev->name=ra0!
    Any ideas?
    Thanks for any help
    EDIT seems to be some kind of hardware problem.
    Last edited by Bazzaah (2012-07-02 17:25:52)

    Hi, a lot of people too (myself included). After upgrade, any usb unit goes away (some external devices like mouses excepted), usb pendrives dissapear (and become corrupted for any other computer), battery goes down  quicklier and performance is affected. It seems 10.9.2 doesn't manage correctly hardware physical connections by asking them continuously. This is my young macbookair performance since I unfortunately upgraded to 10.9.2 four days ago. A lot of people is calling in all forums for questions (iphones, Cameras, external drives, monitors...) that are all related with this missfunction with physical connections.
    MacBookAir 6,2
    Intel Core i7
    1,7 GHz
    8 GB
    ROM:     MBA61.0099.B07
    SMC:     2.13f7
    OS X 10.9.2 (13C64)
    kernel:           Darwin 13.1.0

  • Nokia N70 wont update. Says USB disconnected, clea...

    Tried PC Suite and NSU retail on a Win7 ult x64.
    Starts process and says usb disconnected but it hasnt.
    Have updated certificates by spoofing date but cant overcome this error. Any ideas???
    Thanks.

    solved! needed a sim!!!!!

  • XP + KT3 +USB = dead Windows event sounds

    KT3 MS-6380e ver1 (USB + SOund card event fails)
    New motheboard , new Op SYS.
    I discovered why the sound card windows
    events fail to runUnder XP
    First the USB chip is unknown to XP
    so you must load the Via VT8235 chip drivers.
    getem at Via.com...
    When they load ,you will notice that
    1- All sounds work, wav, mp3 ,ect.
    2- that all windows events ,like Ding.wav
    for critical stop ,are all dead. All Events.
    3- then when you use your first USB device, mine was the  SANDISK smartmedia device.
    As soon as it is loaded and working , magically
    the event codes are up and functioning.
    This happen on both an upgrade to XP and also
    a full virgin install.
     :D

    Quote
    Originally posted by jelly
    KT3 MS-6380e ver1 (USB + SOund card event fails)
    New motheboard , new Op SYS.
    I discovered why the sound card windows
    events fail to runUnder XP
    First the USB chip is unknown to XP
    so you must load the Via VT8235 chip drivers.
    getem at Via.com...
    When they load ,you will notice that
    1- All sounds work, wav, mp3 ,ect.
    2- that all windows events ,like Ding.wav
    for critical stop ,are all dead. All Events.
    3- then when you use your first USB device, mine was the  SANDISK smartmedia device.
    As soon as it is loaded and working , magically
    the event codes are up and functioning.
    This happen on both an upgrade to XP and also
    a full virgin install.
     :D
    did you check  to see if windows deafault was in the window or no sounds or blank in the sounds drop down list? because sometimes that is it also

  • Since upgrading to mavericks anything i connect via usb disconnects

    since upgrading to mavericks anything i connect via usb disconnects randomly. everything from ipods, phones and usb thumb drives is there a patch or fix out there. starting to become a pain. PLEASE HELP

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you boot, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a Fusion Drive or a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to boot and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually login automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, reboot as usual (not in safe mode) and verify that you still have the problem. Post the results of the test.

Maybe you are looking for

  • Upgrade Fails in downtime Phase - MAIN_SWITCH/PARMVNT_XCNV

    Dear All, We are working on the upgrade from ECC6.0 to ECC6.0 with EHP4 and now running in the downtime phase. In the downtime phase, the upgrade stopped in the phase of MAIN_SWITCH/PARMVNT_XCNV and stated that to check the logs of MVNTXCNV.ELG. In t

  • Part of a frame sees to print but I can tell from which object

    Strange thing happening here: In ID3 CS3, the business card I am doing appears perfect. However, when I print it, there is a small portion of what looks to be a frame (the lower left corner) that prints and you can see the lines (very faint but there

  • Incorrect Number error message only started today ...

    Hi there Had my N900 since July and this is first time I have had major problem.. Really weird...I text my wife everyday and have been doing so today as well..but within the last half hour, when I try to SMS her, I get an "Incorrect Number" error mes

  • Opening an *.txt file in oracle forms 4.5

    I am facing this problem I want to call an text file from a certain location and display the same when an user hits a particular button which has to be done in Oracle Forms 4.5. Could u pls help me

  • Keynote with ios5 update

    I am really freaked out here.  It's 2am and my ipad2 is still updating photos but I got no clue whether or not I have lost all my ppt in keynote.  I was planning on showing a short clip (video) in my class tomorrow and teach a lesson already saved in