10-29-2007 03:47 AM
10-30-2007 02:07 AM
10-30-2007 03:34 AM
10-30-2007 12:06 PM
Hi,
I believe Matthieu forgot to include this link to a similar post, rather than imply that you haven't searched the forums ![]()
As far as why a third counter is required, you have to consider how a finite pulse train is generated. Basically, the counter you specify for the finite generation is set up for continuous generation, but is gated by the paired counter. The Paired counter generates a single pulse with the pulse width calculated to stay high long enough to generate the desired number of pulses (using the known output frequency to calculate). So the question becomes, what value could be queried to determine how many pulses have been generated? The continuous counter is just toggling when the counts have been reached, the paired counter just returns once it's pulse has been generated. For this, there is no value to acquire. You really have two options - use a third counter to monitor the tick count, or keep track of when the generation started, and what the current time is and calculate out the number of pulses generated based on the frequency of generation. This is highly dependent on OS timing, so it would work for slow generations (say under 100hz) but would be pretty inaccurate for anything much faster.
Hopefully this answers your questions, if not please post back.
Cheers,
Andrew S
10-30-2007 01:06 PM - edited 10-30-2007 01:06 PM
Message Edited by Kevin Price on 10-30-2007 02:07 PM
10-31-2007 05:35 AM
11-01-2007 09:03 AM - edited 11-01-2007 09:03 AM
However, I wonder where I can get such detailed Information about the internal functionallity of the DAQ-devices and the DAQmx driver? Please let me know where you get this information from. (So that I can avoid using this forum in the future)
Speaking just for myself --- the source has been generally the school of hard knocks. I started doing a lot of special timer/counter work right around the Y2K timeframe. The legacy driver now known as traditional NI-DAQ was then the only game in town. The programming and terminology under trad. NI-DAQ tends to require you to understand the hardware at a lower level. The programming used more counter-specific terminology like Gate and Source signals.
So for a lot of this stuff, I came into DAQmx with a good understanding of the low-level hardware capabilities, and I just needed to tromp around a bit to find the right syntax. Consequently, I'm not much help for pointing you toward info sources as I haven't relied on them much. Meanwhile, good luck with the self-teaching but don't feel compelled to "avoid using this forum in the future."
-Kevin P.
Message Edited by Kevin Price on 11-01-2007 10:04 AM
11-01-2007 10:15 AM
For timing diagrams and good info on the HW, I like to use the M-Series User Manual section on counters. The counters on the M-Series are almost identical in operation to the TIO devices and the way we set up counter operations is the same. I noticed we don't have a good timing diagram for Finite Pulse Train generation, I'll see if I can get that fixed. The DAQmx Help is also a good resource.
As Kevin mentioned, don't be afraid to ping the forums, and just searching www.ni.com will usually yield good results from the knowledge-bases (KBs).
Cheers,
Andrew S