07-19-2011 01:15 PM
Greetings from Colorado!
We have an interesting problem with using USB Flash Memory in conjunction with LabVIEW executable (version 8.5), USB-6212 data acquisition unit, and Windows 7. Summarily, the communication between the LabVIEW program and the DAQ unit sometimes stops upon insertion or removal of a USB flash memory unit.
1. It happens far more often at the customer's site than at our site using the same computer and data acquisition unit.
2. It happens with a variety of USB flash memory unit manufacturers.
3. It happens even if no other USB devices are connected to the computer.
4. It happens with all of the USB sockets on the computer.
5. The computer has a Gigabit brand Socket 775 micro ATX motherboard.
6. Usually it happens if the program is closed, the flash memory is used, then the program is opened. It
also happens with other sequences.
7. It happens even if we wait 30 seconds after using the flash memory before opening the program.
8. We have built many other systems with the same computer, data acquisition unit, and program and it
rarely happens on the other systems.
9. After the failure, we close the program, use the Device Manager to disable and re-enable the DAQ unit, wait
fifteen seconds, open the program, and it works again.
10. It doesn't matter if we use the "safely remove usb device" function in Windows.
11. There is no network connected to the computer.
Anyone have an idea?
Halden
07-19-2011 03:16 PM
Update:
1. Inserting a USB hub between the computer and the USB Flash Memory reduces or eliminates
the problem.
2. DAQ communication also stops if using the Test Panels in MAX instead of the LabVIEW program.
Halden
07-20-2011 11:26 AM
Hey Halden,
Under normal circumstances your USB device should not stop responding during acquisition. However, this issue can occur when plugging or unplugging USB devices while the computer is powered on, as you've experienced with your USB-6212 when you connect/disconnect a USB storage device.
On your PC's motherboard, the southbridge or I/O controller hub (ICH) is responsible for USB communication for your PC. Making or breaking another USB connection while your data acquisition device is connected may cause an error in the communication. This has been observed on chipsets with ICH versions 2, 4 and 6, but may affect others as well.
To determine the chipset in your PC, you may find it listed in the Windows Device Manager or in your motherboard's BIOS. If you know you have an Intel processor, Intel also provides a utility which you can download that reports what chipset you have.
Using a powered USB 2.0 hub connected to USB 1.1 may also exhibit the same behavior. If your application requires plugging/unplugging of USB devices and your PC has one of these ICH versions, a quality powered hub connected to USB 2.0 may help. Alternatively, might consider using a PC with a different chipset.
If you are using a laptop computer, check your power settings to make sure that the USB ports are not being turned off to conserve power, as this sounds like it could be a power issue since the USB Hub helps.
07-20-2011 12:48 PM
Hi Jake,
Thanks for chiming in on this. The Device Manager says we have 5 of them:
Intel(R) N10/ICH7 Family USB Universal Host Controller-27C8
Intel(R) N10/ICH7 Family USB Universal Host Controller-27C9
Intel(R) N10/ICH7 Family USB Universal Host Controller-27CA
Intel(R) N10/ICH7 Family USB Universal Host Controller-27CB
Intel(R) N10/ICH7 Family USB2 Universal Host Controller-27CC
Yes, the last one says USB2 and the others say USB.
The motherboard description says they're all USB2.
Do you know of particular chipsets that definitely don't have this problem? Should we go
for a motherboard that doesn't use Intel?
Cheers
Halden
07-21-2011 05:09 PM
Hey Halden,
Thinking about it a little more, the issue seems to center around available USB resources. The USB-6211 is a bus-powered device, meaning it gets its power from your PC motherboard. PC motherboard USB controllers allocate only a finite amount of current for all the devices, and they typically split the current evenly among the USB devices connected to them. USB DAQ devices like the USB-6211 can draw up to 500mA of current. If you have more than one USB device connected to an onboard hub, then the hub may not have the power output to run all of the devices. That would most likely be why the powered USB hub helps. Is continuing to use the USB hub that eliminated the problem not an option?
Is the USB-6211 plugged into a rear USB port or a front USB port? Similarly, into which port do you plug your USB flash drive? Most motherboards have two onboard USB hubs (typically with 2 USB ports for each hub for a total of 4 USB ports). Front USB ports actually connect to a rear USB hub and share its resources, so if you're using a front USB port with either device, then that may cause issues.
07-22-2011 04:40 PM
A few things I'd try....
Go into each root hub, Power Management tab, and uncheck "Allow the computer to turn off this device to save power". This has given more headaches than I care to admit, especially with laptops.
There's a utility called Device Remover that I install on every test machine I work with... go through and clean up the hidden/uninstalled devices. One of our products has a USB connection that installs as an HID device... a few thousand of those in the registry really plugs up the machine and eventually fills the registry, preventing any more HID devices from being installed (and therefore any products from being tested). That utility will rip through all those uninstalled devices and nuke them from the registry.
Try a good USB hub... I've taken a liking to the Startech ST4200USBM industrial hubs. Throw a power supply on it that'll push >2A current and give that a shot. Those fixed some weird "Miscellaneous system error"s that we saw using the USB-5680 power meters on both XP and 7 machines... all hubs are not created equal.
As a last ditch effort... open Device Manager, then uninstall the USB root hubs (You may need a PS2 or bluetooth mouse/kbd to do this), DAQs, and USB drives. Restart, when the computer reboots windows will reinstall those root hubs and the devices when they're attached.
08-04-2011 07:40 PM
Hello Jake and SnowMule,
Thanks for those tips!
We're using the rear port for the DAQ and the front port for the USB flash memory. The
problem also happens if we put the flash memory on a rear port. The system would look
kludgy if we hooked the DAQ onto the front or if we used a hub between the front port
and the flash memory. As it turns out, the hub helped even when it was not powered!
We bought a couple new motherboards with different brands and different USB controllers.
So far both systems are working fine - USB flash memory activity doesn't mess with the
system! So we'll build future computers with these other motherboards. But there are
some of the Gigabit motherboards in service, so we still need to find a fix (or replace
those motherboards).
I tried unticking the "allow the computer to turn off the hub to save power" on all the
hubs, didn't help. We already tried a powered hub on the USB-6211; that didn't help.
But it was a cheapie hub, so we might try a good one; thanks for the link.
Cheers
Halden