12-03-2012 10:42 AM
I am trying to sequentially flash four digital outputs. I want to run them at a frequency, with 25% duty cycle, one after the other. To be clear, output one on for 25%, output two for 25-50%, output three for 50-75%, output four 75-100%, then repeat. I tried using four counters, but they are not synchronized, so the pulses do not stay sequential. I am using a USB-6143. This seems really basic, but I am a pretty new user.
Thank you -
12-05-2012
09:15 AM
- last edited on
02-12-2025
11:26 AM
by
Content Cleaner
Hi,
You can use the output of one counter as the trigger for the task of the next counter. If you don’t know how to route the signal internally take a look to the next link.
https://www.ni.com/docs/en-US/bundle/ni-daqmx/page/internalchannels.html
Also, your tasks must be configured as retriggable, except the first.
12-07-2012
02:45 PM
- last edited on
02-12-2025
11:26 AM
by
Content Cleaner
Assuming you are using the USB-6343 (there is no USB-6143, although there is a PCI variant), you can either run 4 counter output tasks with triggering and appropriate initial delays, or you can use a single digital output task with the appropriate waveform--for example, using lines 0:3 you could generate {1, 2, 4, 8, 1, 2, 4, 8 ...} to get the desired waveform. The frequency of each output would be 1/4 of your sample rate (the sample rate is configurable).
Either method would work, but using digital output seems like a much more straightforward way to go about generating your signals.
Best Regards,