04-29-2007 04:01 AM
04-29-2007 07:21 AM
Triggered finite pulse trains have what I consider a pretty odd quirk. Based on prior threads, it's not exactly a bug in the code. It apparently works "as designed," but I personally would consider it a bug in the design spec. A number of people (including myself) have gotten surprised by the behavior and many have written to express the wish that it was different. I don't immediately recall *any* who have applauded the implementation.
The quirk is that "initial delay" is applied only during the very 1st trigger and not on subsequent triggers.
Here's an NI article. Here's a thread with a work-around example (the early part of the thread).
-Kevin P.
04-29-2007 03:11 PM
04-30-2007 09:56 AM
04-30-2007 02:54 PM
05-01-2007 11:18 AM
Ahhhhh -- traditional NI-DAQ. I can't look at code now, but will try to talk through some very generic ideas.
1. The steps 1-6 and the formula you describe for calculating initial delay sounds right according to the NI article I linked before. I don't have any personal experience (or at least none I remember) with using initial delay in tradtional NI-DAQ, so can't offer any war stories either.
2. Are you exactly 1 msec off? Is it extremely consistent? I'd think hard about the overall system to determine what kind of thing might conceivably lead to such an exact round error. Is anything being calculated in msec? Might there be a truncation down or rounding up to the wrong integer value?
3. Try some "scientific tweaking." Change pulse parameters one at a time and observe if any of them change the 1 msec error. Look harder at the triggering setup you mentioned too.
4. Try testing the code with the hardware 1000 times slower. Everything that's now in msec scale moves into seconds. (This may or may not be useful, depending on a lot of particulars in your setup.)
5. etc. Just basically some systematic, strategic troubleshooting. What inputs can you change? What output reactions can you observe?
-Kevin P.
05-01-2007 12:30 PM
05-01-2007 05:36 PM
05-01-2007 05:38 PM
05-01-2007 05:45 PM