07-13-2006 02:07 PM
07-14-2006 01:46 PM
07-15-2006 10:28 AM
Hi Neil,
Thanks for the reply. Regarding placing the AO pulse stream in the AO buffer, this would certainly be the optimal option; however, my pulse stream would far exceed the 8k AO FIFO buffer size on the USB-6251. Based on a 1 kHz sample clock (which is the slowest I could get away with), my pulse stream could be on the order of 50k points long (assuming ~50 pulses at 1 pulse/sec, with a capability of having each pulse as short as 1 ms long). That's why I was originally thinking of using a Timed Loop to control output of each pulse, since a single pulse would easily fit within the AO buffer. But your point about loop control being an OS event is well taken (and of concern, since interpulse timing is a critical parameter for me).
So, I've been brainstorming for alternative approaches. What about either one of these two possibilities:
(1) What would happen if I try to write the entire pre-defined 50k-point pulse train array to the AO buffer (with "DAQmx Write" I assume, yes?), and then just start my AO (with appropriate triggering, of course)? This would be the simplest approach, but would it work? Would I get an error about a buffer overflow? If not, how would the extra 42k points of data get transferred into the AO buffer? Should I be concerned about (ie, what would be the probability of) the buffer running out of data faster than it can be replenished?
(2) In this hair-brained scenario, I envision using a "CO Pulse Time" task to generate a continuous output containing the high-low timing of the pulse train (but obviously with no embedded amplitude information). The pulse amplitudes would get stored into the AO buffer as single point values, with intervening single point zero values placed between them. I would then use the CO output as my sample clock source for AO generation, wherein the "DAQmx Timing (change detection)" instance with both rising and falling edge detection of the CO Pulse train is used to control AO clocking. In this way, the rising edge of the CO Pulse would trigger AO to output a single pulse value and hold it for the desired high-time, while the subsequent falling edge of the CO Pulse would trigger AO to output the next point in the buffer...a zero...for the desired low-time. Well...I was pursuing this approach a bit until I read the Help for "DAQmx Timing (change detection)"...it implies that the change detection instance is only for data acquisition, not for data generation. Can someone confirm this? If so, then I don't know how to salvage this approach. Any ideas? (Of course, if Option 1 would work, then I would definitely prefer that approach.)
Thanks for you continued input and suggestions!
07-17-2006 02:20 PM