Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

use internal sample clock for timing of digital output

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
 
 
0 Kudos
Message 1 of 4
(3,966 Views)

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.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 4
(3,953 Views)

Thanks, sorry for the delay!

I checked this with the counter used as an sample clock and it works properly. But I have the next problem: I have to build up 24 channel with different PWM-signals, but I have only one timer for this 24 channels, so the generation of samples will cause some troubles. I can not make a continuos sample waveform of e.g. 1000 samples, because of the different frequencies and duty-cycles.

Does anybody know a NI Hardware which can be controlled by Labview with 24 pwm-channels or counters? 

Thanks

Christoph

0 Kudos
Message 3 of 4
(3,903 Views)

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.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 4
(3,882 Views)