LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MAX issues - loss of all communications

I've finally (nearly) completed my first Labview program after a serious learning curve.  (It's a lot less intuitive than I thought it would be!).  Yesterday I was demonstrating the program to my coworkers and all was well.  All of a sudden, after lunch, I kept getting stuck on a certain step of my test... the step that initializes communication with my external devices.  It would freeze Labview every time.  I couldn't force the program to stop and would have to end up using Task Manager to reboot.

 

Now, nothing is working.  I went back to an earlier (working) version of my program, thinking that some changes I'd made might have broken something, but no.  I open MAX and I constantly have VISA errors and errors on my USB DAQ card.  When I open the device manager, it says no drivers are installed.  I can't do a self test or reset the DAQ card.

 

My system consists of:

Agilent N5768A power supply

Qty 2 BK Precision 8500 series electronic loads

NI USB 6525 USB I/O module

 

These all plug into a 7 port USB hub that plugs into my PC. 

 

I could post my code, but I'm not sure it would help.  The issue seems to be with MAX since it's affecting all versions of my code (all of which were previously working). 

 

This whole project is not giving me a great impression of Labview so far!  Any help would be welcome.  Right now I'm completely stuck and frustrated.

 

Thanks!

0 Kudos
Message 1 of 16
(4,035 Views)

Possibly relevant information - I'm running Labview on a Dell Laptop with Windows XP.

 

I'm using factory device drivers for the loads and power supply communication, all of which rely on VISA.  My port settings are correct.

0 Kudos
Message 2 of 16
(4,032 Views)

I wouldn't be surprised if the hub isn't capable of supporting all your USB devices.

0 Kudos
Message 3 of 16
(4,031 Views)

Can you plug these into a USB jack directory on the motherboard?  I have heard of a USB hub messing up communications to instruments.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 16
(4,030 Views)

My PC doesn't have enough USB ports for all of the instruments.  I will try plugging as many as possible into my PC and see if that makes a difference.  I can write some sample code that will eliminate some of the instruments and see if I have issues there.

 

If the hub was the problem, would it be possible for everything to be working for several days and then all of a sudden just stop?

 

 

0 Kudos
Message 5 of 16
(4,026 Views)

It sounds more like a problem with the DAQ card than with LabVIEW.  Maybe MAX is not seeing it because it is no longer there?  Can you check if Windows sees it?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 16
(4,020 Views)

This is a long shot but I had USb crap out my system before (USB6215 that is) but I am using XP 32 bit.

Anyawy, When I went into Max it had a warning (In Max) about posibly needeing to download some needed patch for XP to make the USB device more reliable.

Hope that gives a clue.

 

0 Kudos
Message 7 of 16
(4,013 Views)

I plugged most of the devices directly into my PC, and those devices are working now, EXCEPT the USB I/O module.  Perhaps that one needs the patch that you were talking about?  I did find the patch information, but I'm scared to do it because it's not an "approved" Windows fix.  I'm afraid it will corrupt my PC.  Since I wasn't getting the issues they talked about in the patch, I figured I didn't need it.  But maybe these other issues could be a result of the same problem.

 

Not sure what I'm going to do since I can't exactly add more USB ports to my PC.  (Well, IT could, but I think they'd be mad if I ask for a new motherboard!).

 

Thanks for the help so far.  Does anyone have any ideas on making a USB hub work? 

0 Kudos
Message 8 of 16
(4,008 Views)

All of a sudden, after lunch, I kept getting stuck on a certain step of my test...

 

Jinkies a clue!

 

Let me guess, Did you remember to change the windows power management options on the USB hub? 

 

Quoting myself from a non-public board


FAQ:s USB Plug'n'Play Devices

In this topic we will discuss some of the common problems that have been observed using USB devices with LabVIEW on Windows operating systems.  Many of these points are also applicable to other environments but the examples will be use the Windows 7 OS.

 

FAQ 1 : My USB device stops working unexpectedly.

The first thing to look at is the OS power saving options.  There is a global trend towards developing "Green" electronics and energy star ratings are getting fairly common.  "If its not being used shut it off" is nothing new.  Cavemen learned how to bank a fire to preserve energy that would otherwise be wasted.  Likewise, the Windows OS has a power saving feature to shut down power to the USB hubs when no user activity is present.  In Automated systems this feature can cause problems since removing USB hub power will shut down the USB device.   Solution: Use the device manager to change the USB hub Power Options.

 

 

FAQ2: I set the power options and my device connection is still unreliable: Remember, those computer USB ports are often the cheapest that can be mounted on the chassis and share the PC system power supply to supply USB Power. Most uses of USB are temporary connections like a thumb drive or a camera.  These connections do not require high reliability since the user is right there interacting with it.  Power surges and fault tolerance at worst cause the operator to retry the data transfer.  Automated systems require a bit more robustness.  Solutions:

1) ALWAYS use an external self powered hub.  Perform your engineering due diligence and inspect the devices specifications too- If you can't find them for that device that should clue you to seek an product from a vendor that WILL publish their specs.

2) High noise environments require the use of ferrites on the USB cable- and don't buy the cheapest cable either! The cheap ones are poorly shielded.  

3) PROTECT the HUB connections-  If you have a USB2.0 device and Joe User plugs in a 1.0 device in a open slot managed by the same hub- Bingo every port on the hub may back convert to USB1.0.  WORSE there are a lot of damaged or marginally engineered USB devices out there.  Joe User's device may cause power fluctuations when it is inserted or removed from the hub just don't let it happen!

 

 

FAQ3: I am testing USB devices and the OS can't find them anymore.

This is a Plug-n-Play feature that deserves some exposure.  When you connect a P-n-P device the OS remembers its serial number in a HKEY (Hive-Key) registry entry.  This is helpful when (for example) you want a specific instrument, Say an NI-USB-6008, to show up as a DAQmx Device with VISA Alias "MyDAQ1" every time it is plugged it.  On the other hand, If you want to test a line of USB-Serial converters this can be problematic since the P-n-P driver will mount the first serial number as "COM3" and the next as "COM4" add infinitum until the enumerator controller in the registry and VISA recognized aliases get used up.  Solution: Use the Windows registry API and the Hardware Configuration API in LabVIEW to clear unused VISA Aliases and HKEY entries.   Speak with your staff IT professional about HKEY structure and possible side effects before developing a plan to edit registry entries.


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 16
(3,995 Views)

@Jeff Bohrer wrote:

All of a sudden, after lunch, I kept getting stuck on a certain step of my test...

 

Jinkies a clue!

 

Let me guess, Did you remember to change the windows power management options on the USB hub? 

 

Quoting myself from a non-public board

 

<snip>


 

I was thinking this also, but the OP had inferred that the PC was rebooted, which normally resets the USB devices.  However, on that note, sometimes shutting down the computer completely and removing the power cord for about a minute or so is the only way to reset some hardware when it truly gets confused.  (You have to take away the power from the bus completely.)

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 10 of 16
(3,971 Views)