Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Wait Until Done doesn't wait for USB-6211

Greetings,

 

I'm trying to get a USB-6211 board to generate a finite analog output waveform every time it gets a digital trigger on a PFI line. The code is simple, just a slightly modified version of one of the NI examples and is attached below. It works fine on a USB-6259 box but when I run it on my 6211 the DAQmx Wait Until Done vi doesn't wait. The result is that I do see some data every time a trigger comes along but the data is all chopped up because the while loop is constantly starting and stopping the task.

 

What am I doing wrong? I can literally just change the physical channels from dev3 (my 6211) to dev1 (my 6259) and it works fine.

 

Thanks,

 

Dave

0 Kudos
Message 1 of 4
(2,908 Views)

Hmm..don't see the attachment. Here it is again.

 

Dave

 

0 Kudos
Message 2 of 4
(2,907 Views)

Hi Dave,

 

Are any of the VIs in the loop returning an error? It's often better to break out of the loop when you get an error (like the DAQmx continuous examples do), use shift registers for the error cluster, or do both.

 

Brad

---
Brad Keryan
NI R&D
0 Kudos
Message 3 of 4
(2,902 Views)

Hi Brad,

 

Nope, no errors. I guess the other piece of info I can provide is that I'm using analog output a0 and PFI1 for the trigger if that helps any.

 

The code I'm really trying to write does check for errors and doesn't find any. The attachment I provided is just a simple example that demonstrates the same behavior, and since it's based on an NI example I figured it was a good place to start.

 

Thanks,

 

Dave

 

0 Kudos
Message 4 of 4
(2,896 Views)