LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Intermittent comm with NI USB 6501 DAQ

I've narrowed the problem down to this simple attached VI. Usually when I boot up my pc (same problem on another pc) and run my LV program, there is no com with the DAQ. However if I remove the USB cable & plug it back in, it SOMETIMES starts working. I then worked solely with MAX. After booting up with the DAQ USB cable connected, MAX recognizes the DAQ, says it tests ok, but when I run the Test Panel and tell a specific output to go low, it doesn't, and no error message. I tried closing the test panel & doing initialize, then going back to test panel, & still no response from the DAQ. Then if I unplug the USB cable & plug it back in, I get the 'New Acquisition Dev', I click Cancel, and NOW I can use the test panel to talk to the DAQ. The LV program responds the same way.  I'm doing this on my laptop after first finding the problem on another pc where the distributed LV program resided. I'm using LV 8.5, Windows XP, and DAXmx v8.6. Why am I having so much trouble communicating with the DAQ?
0 Kudos
Message 1 of 5
(2,984 Views)

Hi wb2nvy,

When your device is plugged in and you are having problems, does the device show up in Windows Device Manager? If so, You may want to try installing the new version of DAQmx (8.7.1) to update some of the core components. If not, you may want to consult with your laptop manufacturer about your USB ports as laptops sometimes don't implement the full USB 2 specifications to save on power. This could show as some intermittent performance issues with our DAQ devices.

Also, how are you testing to make sure that the device isn't outputting? Are you reading the outputs with a DMM or simply going off indications from the test panel?

PBear
NI RF
0 Kudos
Message 2 of 5
(2,959 Views)
Sorry for the late response but I've been working other projects. I installed DAQmx 8.7.1as you suggested & no change in the problem. I verify proper behavior by putting a DVM on one of the programmed outputs & watching for a state change. The vi I attached in my original post sometimes doesn't work. The DAQ output does not change. I then tried the sample vi from the help files called Write Dig Port.vi, and that works every time. If I immediately go back to my original vi, it still doesn't work. If I run MAX & use the test panel, that works, and if I go back to my original vi, it will then work ok. It appears the problem is with the DAQ Assistant. I suppose I can modify the Write Dig Port.vi for each instance of the DAQ Assistant in my LV program, but that doesn't help explain why the DAQ Assistant won't work. Any ideas?
0 Kudos
Message 3 of 5
(2,887 Views)
Hi wb2nvy,
 
It sounds like the issue has changed. In your first post you were having problems keeping communication between the USB DAQ device and you computer functional. Now it seems like the DAQ device communication is constant and your VI is simply not functioning the way you wish (which is also a different VI than the one posted above). Please verify or deny this.
 
What DAQ device are you using? If you're device requires an external powersupply, ensure that this supply is stable and not fluctuating or has a loose connection. Also, look at some of the links in my signature for great resources on successfully building LV DAQ applications. You're comment about modifying the Write Dig Port.VI is not a bad idea at all and I would encourage this movement from the DAQ Assistant to the DAQ API. Remember that instead of simply copy and pasting the Write Dig Port.VI you can create much more refined and efficient code by creating the channel/task once and clearing the task once and doing ALL of your DAQmx Reads on one task. Again, look through the DAQ links below
PBear
NI RF
0 Kudos
Message 4 of 5
(2,872 Views)
PBear, there is nothing inconsistent with the problem description. Communication IS intermittent in that sometimes the sample VI works, and sometimes it doesn't. Max sometimes works and sometimes doesn't, and changes in behaviour can be made by unplugging & replugging the USB cable. I have since discovered the problem. I was overloading my DAQ digital outputs when they were in the open collector mode. I thought I could solve the problem by using active output mode, but couldn't find any documentation showing how to do that. So I called NI help & with some difficulty he talked me through the steps and now everything works ok. Thanks for your patience and help.
0 Kudos
Message 5 of 5
(2,855 Views)