04-17-2006 11:27 AM
04-17-2006 12:16 PM
04-17-2006 01:14 PM
Hi pelesl-
The behavior you are seeing is expected and is discussed briefly in this KB. The idea is that you can configure different pulse specs from your first pulse than subsequent pulses if you would like. If you want consistent operation with every retriggered pulse generation, simply configure your initial delay and LowTime/HighTime (whichever one corresponds to your idle state) to the same duration. This will make all triggered pulses predictable and identical with respect to delay, duration, etc.
Hopefully this helps-
04-17-2006 02:26 PM
04-17-2006 04:39 PM - edited 04-17-2006 04:39 PM
Hi pelesl-
I misread your earlier post- you're correct in saying that it's not possible to create a uniform initial delay for a retriggerable finite pulse train generation. The best method to accomplish this behavior is to manually program the two counters required for a finite pulse train generation. This method allows you to exploit the behavior of a uniform initial delay that's available with a single pulse generation. Here's how you might accomplish it:
The end result should give the effect you're looking for. Please let me know if you need any additional information. Thanks-
Message Edited by Tom W [DE] on 04-17-2006 04:42 PM
04-17-2006 05:31 PM
04-17-2006 05:43 PM
04-17-2006 06:04 PM
04-17-2006 09:42 PM
04-18-2006 11:20 AM
...am I not correct in saying something is broken? If indeed you can only have a re-ocurring delay for single-pulse signals, then there should be three timing modes: "continuous", "singlepulse", and "Npulses"... I still don't know whether the low time comes before the high time, where this is in the documentation, and whether any of this is "broken" or not.
FWIW, I'd put in a vote for "broken." Fortunately there's a pretty reasonable workaround as TomW posted.
I understand why NI wanted to offer a behavior where the first pulse has a different idle time than subsequent pulses, but it was added in a way that was NOT transparent to existing users. For years, most of NI's DAQ vi's were designed so that if you left optional items unwired, a pretty normal & expected default behavior would happen. I personally think that the "initial delay" parameter for pulse generation broke this trend.
My opinion: if "initial delay" is unwired, the programmer is NOT INTERESTED in a special initial delay and the input should be IGNORED. Pay attention ONLY to the regular pulse specs. This defaults back to the traditional behavior before the initial delay parameter was introduced. I find it kinda annoying that over and over again, I MUST wire a value to initial delay even though I don't want any special initial behavior.
I also got thrown off on the question of "low time before high time?". I think I recall some docs stating that the low time happens first. But in reality, that's true only for the default output polarity. If you change it, then the high time happens first and the docs are wrong. What IS always true is that the "idle state" comes first. I suspect that part of the docs were written by someone who'd only dabbled with the counters and didn't even realize that "low time" is not necessarily always the same as "time spent in idle state."
All these things were more explicitly clear in the traditional NI-DAQ programming model for counters. DAQmx has expanded some capabilities and has tried to abstract away some of the hw implementation. I think it has brought fairly simple counter operations within the reach of a LOT more beginning users who may have been scared off by all the counter-specific jargon needed to talk about traditional NI-DAQ. It has also brought in several new capabilities for more advanced users. However, I think a bit of new confusion was introduced for those advanced users as well.
I've written docs before though, and I've been frequently surprised that stuff I thought was clear and thorough turns out to cause confusion. It's really hard to get it right. Hopefully NI will keep working to improve it. Meanwhile, there's quite a bit of info here on ni.com, though you sometimes have to be persistent in your search queries. Somehow, searching "entire site" leaves out the DevZone and forums. And depending where you are on the site, the list of available categories to search keeps changing. Then again, I'm glad I'm not responsible for organizing that quantity of information...
-Kevin P.