04-20-2023 09:29 AM
Hello everybody,
I'm looking for a while how to realize a delay between 2 digital output pulses, with the USB-6351 card.
I first made a program to send a signal to the digital output. For that, I used the CO Pulse Freq function. Because I need to adjust the duty.
Moreover, to know, this one is triggered from an external signal on a rising edge. cf the VI : 1signalCO Pulse.vi
Now, I want the external source to trigger 2 digital outputs on the board, but with a delay between the 2 ?
For that, I duplicated the first program for the generation of the second digital output. Then I put a tempo between the two DAQmx start task.vi. cf the 2signals CO Pulse with delay.vi
But nothing works. This gives two simultaneous output signals .... There is no delay between ... see attached jpg image ...
I would like to have a delay between the blue and the pink curve ....
Do you have an idea about the problem? a trigger statement?Sincerely
Solved! Go to Solution.
04-20-2023 08:12 PM
A wait timer between two DAQmx Start VI has no effect if you configure the start trigger. The task is armed and ready to accept the trigger when DAQmx Start VI is called. It will only start outputting once it receives the start trigger. To set a delay between two counter output tasks, use Counter Output:Pulse:Frequency:Initial Delay Property.
04-24-2023 06:49 AM
Hello,
Very good! Thanks for your help
We can see the result on the picture. It is now possible to control a delay between two output signals.
But, I have another problem that appears. I can only use this delay once.
This InitialDelay function is only checked once with "Start.Retriggerable" of the DAQmx Trigger property node.
I would like to have the ability to send a delay on each detected rising edge.
Do you have an idea?
Thank you very much for your help.
Translated with www.DeepL.com/Translator (free version)
04-24-2023 09:12 PM
Good news, your X-series device should support the special property "Enable Initial Delay on Retrigger". Use a DAQmx Channel property node, the pic below shows where to find it.
-Kevin P
04-25-2023 01:20 AM
Unbelievable!
It's so good! Thank you so much!
Thanks for helping me and sharing your knowledge!
Best regards