Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

AO missing 1st output when triggered with AI/StartTrigger

Hi,

I have MIO-16xe-10 card, and am trying to start output and acquisition simultaneously using daqmx. I have copied most of the diagram from the Multi-Function-Synch AI-AO.vi example (see the attached vi). When I try to run it with only 1 iteration (that is, when the AI-AO happens right after the configuration) it works fine. But when i do 2 or more iterations, from iteration 2 on it "forgets" to output the first point to AO. I can see it on the oscilloscope, too.

The question is: why?

Thanks in advance for your help,

-Alex
0 Kudos
Message 1 of 7
(3,070 Views)
I think I've just had a similar problem, have a look at this and see if it helps.

http://forums.ni.com/ni/board/message?board.id=250&message.id=9790
0 Kudos
Message 2 of 7
(3,063 Views)
Hi,

I'm actually missing 1 OUTPUT point. On the input I get all my points fine. It's just that the output seems to not want to send the first point of the waveform (it does send the StartTrigger, though).
0 Kudos
Message 3 of 7
(3,060 Views)
I forgot to mention that when you run the attached VI you need to hook up the Dev2\ao0 channel to Dev2\ai0. The vi outputs 3 points, and at the same time tries to acquire 4000 points (using the ai trigger to start the output, thus synchronizing the two). I have attached two screenshots to show both the output and the input. If the number of iterations is 1, it all works fine (ScreenShot001). But if it is 2 or more, the AO "skips" the first point (ScreenShot002).

Anybody any idea of what's going on???
0 Kudos
Message 4 of 7
(3,025 Views)
Hi,

So do you see this behavior when you run the example program? What do you mean by "iteration"? I know you posted this a while ago, so please let me know if you are still having the same problem. Have a Great Day!

George
0 Kudos
Message 5 of 7
(2,972 Views)
George,

thanks for reading! I see this behavior when I run the VI attached to my previous message. By "Iteration" I mean the second crank of the FOR-loop, when "number of steps" >1 . It seems that if I do the "Create Channel", "Clock Config", etc. for a DAQmx task, I can run it once with all points sent and received (that is the first iteration of the for-loop), but if I execute the same task again without going through all the configuration first, I miss the first output point (please see the screenshots attached to the previous message).

-Alex
0 Kudos
Message 6 of 7
(2,956 Views)
Hi Alex,

I can't see anything wrong with a brief look at your code, but I have two suggestions. First, create a simple VI that starts and stops an Analog Output task, to see if you can duplicate the behavior. This should definitely be your first course of action. Then, if you can duplicate the behavior, you can post the code, and I can look at it. If you can't duplicate the problem, then you will need to change your code. Some things I would suggest is to not use sequence structures nor global variables. You can instead create subvi's and just wire between the code. If you can't duplicate the problem, then you obviously know that it is not something with the hardware, and you just need to do something different in your code. I hope this helps.

Have a Great Day!

George
0 Kudos
Message 7 of 7
(2,891 Views)