LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Clearing DAQmx AO task takes long time

Hi,

 

I have an application that has been running on 2 PXI machines and another machine with NI USB 4431 for over a year now. Recently, I upgraded the 2 PXI machines with 64-bit cards(PXIe 8840). After upgrading, one PXI machine started taking a long time to clear the Analog Output task. I have attached the acquisition code here.

The same code runs fine on the other PXI machine. Both the machines have Win 7-64 bit, 8 GB of RAM, latest version of DAQmx. The same code also runs fine on the machine with NI USB 4431.

 

I swapped the 8840 cards in the 2 pxi machines and still the PXI machine 1 would have the same issue.

 

Going through the forum posts, it seems like updating the daqmx driver would solve the issue but it didn't in my case. 

Does anyone know what could be the issue and how to resolve it?

 

Thanks,

Ritesh

0 Kudos
Message 1 of 13
(3,760 Views)

No specific theory why you have different behavior on 2 systems, but I'm suspicious of seeming coincidences like the code comment that AO takes 20 sec to clear, when 20 sec is also what's wired to the DAQmx Write timeout for that task.

 

Things I'd be trying in the course of investigating:

- Change the wired timeout value, see if the delay for DAQmx Clear follows.

- Set auto-start to False on DAQmx Write, then call DAQmx Start explicitly instead 

- Insert a DAQmx Stop before the call to DAQmx Clear for your AO task.  Observe whether the delay happens at Stop or at Clear

- Insert a DAQmx Wait Until Done before the DAQmx Stop.  Experiment with the timeout value you give it.  If you're still getting delays at Stop or Clear, see if they follow this value. 

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 13
(3,719 Views)

I changed the timeout value on the DAQmx Write to 10s, set the autostart to False and added a Start Task function, added a "wait until done task" vi with timeout value of 12s, added a stop task vi before clear task for the Analog Output task.

 

It still took 20s for the clear task vi to execute. It took 12s to execute wait until done vi and 0s to execute stop task vi.

The time it takes to clear the output task is always 20s irrespective of the timeout value.

0 Kudos
Message 3 of 13
(3,706 Views)

Again, no working theories, just shotgunning to see if something shows up that helps narrow the focus.

 

If I follow, the problem stays with the chassis when you swap the controller cards, right?  Are both the same model chassis?  Is your data acq board using the same slot in both? Have you tried moving the data acq board to a different slot?  Have you tried attaching and using the USB device on the troublesome PXI system?

 

Again, no specific idea here, just bringing up a few things I'd be liable to check or try.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 4 of 13
(3,658 Views)

Yes, the problem persists if I swap with another 64-bit controller(PXIe 8840), but the problem goes away when I put the previously installed 32-bit controller(PXIe 8820). Both the chassis are same - PXIe-1071. I even swapped the data acquisition cards in the 2 pxi chassis and still pxi 1 had the same issues. The problem is only with the output channels - the acquisition card has 2 input and 2 output channels and the the input task on the same card clears instantly.

 

I didn't try moving the acquisition card to another slot - I will try that and let you know if that solved the issue or not.

0 Kudos
Message 5 of 13
(3,650 Views)

I tried putting the acquisition card on a different slot but the the problem of clearing the task still persists.

0 Kudos
Message 6 of 13
(3,630 Views)

No other ideas here.  Probably time to call NI.

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 7 of 13
(3,624 Views)

OK, will call NI.

Thanks for your help!

0 Kudos
Message 8 of 13
(3,622 Views)

Hello,

I am facing the same issue with a PXI8880 controller.

I am curious if you got any help by NI and solved this issue.

 

Let me know, thanks.

0 Kudos
Message 9 of 13
(3,205 Views)

Yes, I called NI and they confirmed that they are aware of the issue but it is so intermittent that had not been able to reproduce or resolve it.

In the end, they had me purchase a new card as the old one was out of warranty.

Message 10 of 13
(3,196 Views)