Discussion:
use internal sample clock for timing of digital output
(too old to reply)
C.Langer
2007-06-25 08:40:13 UTC
Permalink
Hi,
i had to generate pwm-signals via digital outputs of the NI PCI 6259 Card. Is there a possibility to use an internal sample clock for the DAQmx Timing. Up to now a work with a Counter connected to a PFI input as Timing source, but I'm looking for an better solution. What can I do?
 
Thanks
 
Christoph
 
 
Kevin Price
2007-06-25 16:40:17 UTC
Permalink
The "correlated" DIO on the M-series board do not have their own timing subsystem.  So there is no direct way to use an internal sample clock for hardware-timed DIO.  Using a counter is one typical way, sharing the AI or AO sample clock is another.
However, you'd probably be better off generating PWM with one of the counters anyway.  It's a much more natural fit than trying to do it with DIO.  Search examples and this site for PWM to get started...
-Kevin P.
Kevin Price
2007-07-03 16:40:14 UTC
Permalink
Do the 24 channels of PWM need to be able to adjust independently on-the-fly?
NO:  you *might* be able to very carefully define your DO buffer to provide 24 invariant PWM signals.  There will likely be compromises, and you'll need to dust off your old math knowledge about Greatest Common Factors and Least Common Multiples to try to get them all defined.  Then it will be a bit of a mess to merge all those on/off times into a single array of 32-bit values.
YES: you should think of this as 24 separate counter tasks.  Best way I know to get there with NI hardware is to buy 3 of the 6602 boards which have 8 counters each.
- Kevin P.

Loading...