02-17-2011 02:01 PM - edited 02-17-2011 02:07 PM
Hi, I am here asking a trivial question: Using PCI6071E, at the end of an analog output, is there any way to output a trigger or update a digital line? i.e., we hope when last sample outpout is done, a digital HIGH is generated to drive a switch. I can think of having an analog task and digital task, and excute the digital task at the end of analog task in the program, but I am not sure how long the delay would be. Any better ways to do this? Thanks!
Analog output: large/finite size but NOT via FIFO, internal CLK, software trigger
on DAQmx/C++/WinXP
Solved! Go to Solution.
02-18-2011 09:51 AM
eLions,
The analog task followed by a digital task that you were thinking of would work, however there would be a small software timed delay like you thought there would be which may cause some problems. If it is a finite size analog output (lets say 1000 samples), what you can do is synchronize the digital and analog tasks together and have a digital low for 1000 samples, with the 1001st output on the digital line being a high. This would have no delay, as the analog and digital line would be sharing the same frequency. The provided C++ examples show how to synchronize analog out with analog in, which can be modified for digital out.
02-18-2011 10:19 AM
Thank you very much for your suggestion!
I wondered there might be "AO task is done" hardware trigger on the board, so recalling it would be really easy. But anyway, the synchronized AO-DO will work for us.
We have a AO sample size 300,000. Will synchronization work the same way if the sample size is bigger than FIFO buffer size?
02-21-2011 12:47 PM
I am glad that this has helped! There is no "AO task is done" trigger in hardware on the board, however for the 300,000 sample AO data that you are sending, as long as the digital line is trigger on the 300,001st sample it should work correctly. I know in labview, if you set the sample to output to 1000, in the while loop you can output 1000 samples of low on the digital line and when the loop hits the 300th iteration, with a case statement you could potentially output 1000 low signals and then 1 high signal and quit the task and loop directly afterwards. This same thing could potentially be done in C++ as well, however if you need further explanation feel free to reply. Have a great presidents day!
02-21-2011 01:19 PM
Hello Frank, thanks for your further assistance. I tried the method, but it did not seem to work on the card PCI 6071E. Please check http://forums.ni.com/t5/Multifunction-DAQ/Multifunction-synchronization-on-PCI-6071E/m-p/1459760#M62... if you are interested. But anyway, we are using asynchronized AO-DO now, since the delay is only <1.5ms.