07-28-2008 06:59 AM
07-28-2008 10:53 AM
A simple way would be to use the analog sample clock as the timebase for generating the counter pulses. However the startup behavior isn't what you most likely want. You'd be producing analog samples for a while before generating your first pulse train edge.
Another way would be to use your other counter (let's say CTR1) as a kind of "master timebase" equal to the desired analog output sample rate. You should be sure to start this task *last*. You would use CTR1's output as the analog output task's sample clock. You would also use it as the timebase to drive your original counter pulse train (CTR0) which cycles once per analog output sine wave. A final config item would be to trigger the analog output task from the output of CTR0. Then the output won't start until the first pulse of CTR0.
-Kevin P.
07-29-2008 01:49 AM
thanks but i am a bit confused as i am new to labview.
Actually i want to generate a 10 Hz sine wave at one of the analog outputs and at the same time
i want synchronised in phase and quadrature signals wrt to above sine wave at ctr 0 and ctr 1 outputs.
could you please elaborate.
thank you so much
07-29-2008 02:03 PM
07-29-2008 03:12 PM
Hello mpsarma1,
Kevin has provided good solutions, but I thought I'd just throw this out there as well. If you're only using one of the analog outputs in your application you could also just use both, generate a sine wave on one and a square wave on the other. You could start from the Cont Gen Voltage Wfm-Int Clk.vi example (Open LabVIEW and go to Help» Find Examples... Then navigate to Hardware Input and Output» DAQmx» Analog Generation» Voltage» Cont Gen Voltage Wfm-Int Clk.vi). This example generates a sin, square, saw, or triangle wave and you could modify it pretty easily to output a square wave and sine wave on each of the analog output channels.
However, if you're already using the other analog output I would recommend following Kevin's suggestion.
Cheers!
07-29-2008 04:40 PM
And vice-versa. If you're new to LabVIEW, chances are really good that Brooks' suggestion will be *much* simpler to deal with. I got myself into counter tunnel-vision because we're on the counter/timer forum...
-Kevin P.