Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Intermittent application hang when using DAQ assistant

Solved!
Go to solution

Hi Pete,

 

I've got a couple of questions/suggestions for you: 

 

What version of Labview are you using? You may be able to upgrade to a newer version of DAQmx, which could fix the problem.

 

Also, you mentioned that the program seems to get hung up in a subVI; I assume this subVI is using a DAQ assistant. One thing that you could try here is using DAQmx VIs instead of a DAQ assistant, as that may help with the issue. Joe S's post earlier in the forum can point you towards some good resources for getting started with DAQmx VIs.

 

Are the USB-6009's plugged into ports on the front or back of the computer? The ports on the front are handled as a hub by Windows, so plugging them into the back may help. Also, are there any USB hubs attached to the computers that are hanging, even if the 6009's are not plugged into them?

 

Let me know how the above steps work out, and we can proceed from there. 

 

Best,

Dan N

Applications Engineer

National Instruments 

0 Kudos
Message 11 of 25
(1,936 Views)

Josh,

 

LabView 2010 v10.0f2

The point on DAQmx VIs vs DAQ Assistant may be worth pursuing.  I am using Assistant in this application, but used DAQmx VIs in the app that does not exhibit this problem.

I am using rear USB connections.

 

Our IT guru wondered if the ATI display driver could be the culprit - he claims that it causes him a lot of headaches on the office PCs.  The PC has on-board ATI Radeon Xpress 1100.  I updated the driver to the latest for this system config and haven't seen the application hang so far today.  Does this ring any bells?

 

Pete

0 Kudos
Message 12 of 25
(1,931 Views)

Hi Pete,

 

Have you experienced any more crashes/hangs since updating the driver?

 

There could be a memory issue at hand here; your computer that doesn't hang has 3.25 GB of ram, and the one that does has 2. DAQ Assistant VIs take up more memory space than DAQmx VIs, so again, that would explain this behavior. Labview may be trying to borrow some of the memory on the graphics card, which is why upgrading your graphics drivers may have solved the issue.

 

Best,

Dan N

Applications Engineer

National Instruments 

0 Kudos
Message 13 of 25
(1,895 Views)

Josh,

 

Updating the graphics driver didn't fix the problem - it reared its head again after several hours operation.  PM is showing 1.3GB physical RAM available so I don't think it's a memory problem.

 

Pete

0 Kudos
Message 14 of 25
(1,887 Views)

Hi Pete,

 

How many DAQ assistants do you have in this application altogether? You may be creating a race condition, especially if you have DAQ assistants that reference the same device in different subVI's. Also, since you are running Labview 2010, you can upgrade to our most recent version of DAQmx, 9.4, which can be found here

 

Finally, since you said you were not having a hang with DAQmx VIs, if you can rewrite the application easily to use DAQmx VIs, that may be a possible solution. 

 

Best,

Dan N

Applications Engineer

National Instruments 

0 Kudos
Message 15 of 25
(1,865 Views)

Dan,

 

I have three DAQ Assistants running in one VI.  All are referencing the same USB-6009 device:

Read 7 analog input channels

Write 11 digital outputs

Write 1 analog output

 

Do you have any reason to believe that updating to DAQmx 9.4 might address this problem?

 

Changing to DAQmx VIs is possible and I'll give it a try as soon as I can give it priority.

 

Pete

0 Kudos
Message 16 of 25
(1,861 Views)

Hi Pete,

 

That configuration of DAQ Assistants sounds alright to me, since you have one assistant for each type of task, which is the correct way to use them.  

 

Upgrading may take care of your issue, since you mentioned that initially repairing DAQmx on the target computer resolved your hang, and then distributing the install caused it to recur, upgrading may take care of the error. DAQmx 9.4 is compatible with Win XP and Labview 2010, and can be downloaded at ni.com/drivers. 

 

Also, were you ever able to replicate the problem on another machine?

 

Best,

Dan N

Applications Engineer

National Instruments 

0 Kudos
Message 17 of 25
(1,849 Views)

After more testing, it turns out that the DAQ assistant is still hanging intermittently (every few 100 cycles). It appears that the DAQ assistant never completes, despite there being a timeout. CPU usage is at 0, and the computer and LabVIEW GUI are still responsive. LabVIEW does not report any errors when this happens. Enabling "highlight execution" shows no activity.

 

When I click the stop button, LabVIEW freezes, but it recovers immediately when I unplug the DAQ. Sometimes the application continues working again if I reinsert the DAQ and hit start, but sometimes the PC needs a reboot.

 

I have several DAQ assistants throughout the application. Each one does either a single digital write, a single digital read, or a finite analog read (50 points, 200Hz). They are run in sequence, never more than one at a time. Using LabVIEW 2010 with the v9.3 DAQ software. The hangs occur when I use a generated EXE and when I run the source code directly.

 

Here are some things I've tried:

- Upgraded DAQ software to v9.4f1. This actually seemed to make the application hang more frequently.

- Installed the LabVIEW 2010f2 service pack. No effect.

- Completely uninstalled and reinstalled the DAQ software. No effect.

- Repaired the DAQ software. No effect.

- Plugged the DAQ into different USB ports on both the front and back of the PC. No effect.

- Added delays so DAQ assistants are never run in sequence without at least a short pause in between. No effect.

 

Any ideas on things to try? I have not tried converting the DAQ assistants to DAQmx VI's, but the application is large enough that I can't justify this unless there's a very good chance it will work.

0 Kudos
Message 18 of 25
(1,807 Views)

Also tried the following:

- Tried disabling the DAQ driver in device manager. This caused device manager to freeze and stop responding.

- Tried resetting the DAQ in MAX. This caused MAX to freeze and stop responding.

 

In both cases, unplugging and reinserting the DAQ caused everything to start working normally again.

0 Kudos
Message 19 of 25
(1,793 Views)

I created a new application containing just a loop with a single DAQ assistant - a finite analog read on one channel (50 samples at 200Hz). I found that this reliably reproduced the halt behavior after 1000-2000 iterations. I also used the automatic feature to convert the DAQ assistant to DAQmx VI's (see attached screenshot), which seemed more stable but still had the hanging problem.

 

The application would just stop iterating without reporting any errors. Trying to stop the app caused LabVIEW to completely freeze until the DAQ was unplugged. When I unplugged the DAQ in the hang state, LabVIEW threw an error on "Clear Task" saying the DAQ could not be found.

 

Windows 7, LabVIEW 2010, DAQ v9.3, Intel Core i5. Another datapoint - moving the DAQ from a front USB port to the back of the PC seemed to make the app hang more frequently - every few hundred iterations.

0 Kudos
Message 20 of 25
(1,789 Views)