03-08-2010 11:07 AM
Solved! Go to Solution.
03-09-2010 07:14 PM
Yes it can.
You will have to set up a dummy analog input task, and then set both counter tasks to use ai/StartTrigger as their start trigger. Your first counter will start immediately, but for your second counter task specify a value for the "initial delay" terminal of the DAQmx Create Channel VI.
This "initial delay" will be in seconds, and will be the delay after receiving the start trigger that the second pulse train begins.
05-02-2011 09:53 PM
Hi,
I am trying to output two 10Hz pulse trains with a variable phase delay of 0.1ms resolution.
Can it be done on NI-6229 and what is the max phase error between the two pulse trains?
rgds
05-03-2011 09:25 AM
You might try to set up counter 0 and 1 for re-triggerable single pulse generation. Configure channel1 to use a start delay (this would be your phase delay). Then use the FREQ_OUT output to generate a trigger at 10Hz. Route the FREQ_OUT to the START trigger of both channel 0 and channel 1. You then might be able to vary the phase delay dynamically in software without having to stop the task. If the DAQmx driver doesn't allow you to modify the start delay (which may be very likely) while the task is active, this this idea will not work. Try using the DAQmxSetTrigAttribute() function to set the DAQmx_StartTrig_Delay attribute. The resolution of the phase delay depends on the counter source.
05-03-2011 09:26 AM
yeokiwi,
Do you need the phase delay to be varied on the fly while the pulse trains are being continuously generated? Do you need the pulse trains to be perfectly square (exactly 50% duty cycle) or are you only concerned with the leading edge of each pulse?
You can probably do what you need with your board. The *variability* in phase delay will be very small, probably something like 50 parts per million based on the board's internal timebase spec.
-Kevin P
05-03-2011 05:45 PM
Hi all,
Thanks for the help.
I did it with the use of ai/starttrigger and a dummy analog input. The starttrigger will start the first pulse train and the next pulse train will start at a predetermined phase delay.The output is very accurate after some minor adjustment to the Initial Delay. I can easily get a phase delay of 0.1us resolution.
rgds