Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

lost input during output with USB 6212

I'm using an NI USB-6212 to record input from three channels (AI0, AI1, and AI2) and output to one channel (AO1). I'm having a problem with the AI sometimes when I send an output. In about 1 in 5 times that I send an output, it looks like I lose at least one sample, since my input channels appear to switch. I contacted MathWorks about this, and apparently they've seen this problem in the USB 621x family. It was supposed to be fixed in NI-DAQmx 8.9, but I've updated and I still see the same problem. Is there a way to fix this? If not, can you recommend another device that could be used for this application? I'd like to trade in my UBS 6212 for something that doesn't miss samples if it can't be fixed. Thanks!

 

Heather

0 Kudos
Message 1 of 6
(3,632 Views)

Hi Heather,

 

Can you post code and give a high level description of the operations? For example, are you acquiring AI continuously and randomly starting/stopping AO, or are you doing finite AI and AO over and over again? I'd like to try to reproduce this. As far as issues with the 621x, I have not seen this behavior before. There was this post: using AO subsystem on USB-621X interferes with AI subsystem but it was fixed in 8.9 and does not sound like the behavior you are describing. 

 

Thanks, 

Andrew S

0 Kudos
Message 2 of 6
(3,614 Views)

Yes, I am running AI continuously and sporadically sending an output. I'm attaching my code and a simple GUI here. Hit Start Up first and then Start Looping. When I run this, I see the three inputs plotted each second, and I push the Stim button every couple of seconds. On some stimulations, I see the inputs "switch" or each input change colors.

 

I think I'm going to switch to the USB-6251. That will work for this application, right?

 

Cheers,

  Heather

0 Kudos
Message 3 of 6
(3,606 Views)

Hey Heather,

 

I can't run the code but it does help me reproduce in LabVIEW. I've attached an exe that should be doing the same thing, though I can't reproduce your problem. I can write to AO multiple times and I do not see a channel shift when I read DC values on my AI channels.  Does it reproduce when you run it?

 

A USB-6251 should also work for this application and has more functionality than the USB-6212, but if the issue is in the Matlab code then it may have the same issue. I'd ping them to see. 

 

Thanks, 

Andrew

0 Kudos
Message 4 of 6
(3,595 Views)

I think I'm missing something. I tried this GUI, but when I input a function to one of the channels, I don't see that plotted as input, so I can't see if it switches on output. I can't even tell if it is really sending an output. Is there a way to send it to disk to look at the data? Also, I can't see the code to figure out what it's doing. Is there a way I can check it out?

 

I reran my code, but stopped looping so that data just went directly to disk. I still see the switching problem when all that is happening is that the input is going to disk and I send the occasional output. That can't be Matlab code related, right? The only Matlab code running is the occasional start(ao).

 

You think it's not going to help to upgrade? What else should I try?

 

Thanks for your advice!

 

Cheers,

  Heather

0 Kudos
Message 5 of 6
(3,582 Views)

Oh, I should say that I went to MathWorks first, a week or so ago. I sent them my GUI, and they said it was an NI problem.

 

Heather

0 Kudos
Message 6 of 6
(3,581 Views)