05-16-2017 07:00 AM
Good day to everyone
I want to use a NI USB-6259 BNC for generation of two pulse trains; both would have a frequency of 35 kHz and a duty cycle of 0.2, but the initial delays would vary by half the period (that is, one would lag after another for T/2). Is there a way to implement this without using both counters of the DAQ board?
05-17-2017 09:48 AM
Have you looked into generating a square wave through a PFI line and using that as a counter?
05-17-2017 10:34 AM
No*.
*Well, not in a way you're liable to like. Assuming the freq, duty cycle, and relative phase are fixed and never need to vary within a run, you could possibly approach this using hw-timed digital output. You'd need to supply a 350 kHz sample clock (probably from 1 of the counters) so you can divide the period by both 5 (for duty cycle) and 2 (for phase). And depending on your exact needs at task startup, you might not be able to use regeneration for the task. If not, you'd need to run a separate feeder loop that keeps writing DO data to the task buffer at a 350 kSamp/sec rate. Doing that across USB might prove problematic.
Using both counters is much more straightforward, so why do you want/need to keep 1 in reserve?
-Kevin P
05-18-2017 09:14 AM
Hello,
To add a little more details to the previous statements:
Since the externally powered USB 6259 is correlated Digital I/O compatible, you could use this property to synchronize the data.
More Information on Correlated Digital IO are provided here!
For more information on your device, please visit the Waveform Characteristics under the Device Specifications Sheet >> Digital I/O/PFI
Could you solve the problem by now?
Regards and Greetings,
James.
05-18-2017 09:18 AM
This method should work but I would also want to know why you can't reserve both counters.
05-18-2017 09:24 AM
Double your output frequency and add a couple of flip-flops to divide the frequency in half and offset by a pulse at the input frequency.