Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronize counter with analog output

Hi,
Right now, we are using two analog outputs to generate two saw-tooth waves at different frequencies. For example, one is 512Hz, another is 4Hz. And we also need a synchronized clock signal to trigger the DSP board with AD converter. So I am using counter to do this job, and this counter has same frequency as the saw-tooth wave at the low frequency analog output (4Hz). Could do me a favour to find a similar example program? Thanks a lot.
BTW: I attached my program here. It works with 1 counter and 2 analog outputs. But they are not synchronized.

Regards,

Shikui Yan
Electrical & Computer Engr.
University of Connecticut
Tel: 860-4863673
0 Kudos
Message 1 of 2
(2,609 Views)
Shikui;

They aren't synchronized because you are not using the same clock pulse train to clock both the Analog and the counter tasks.

The best way to accomplish that is to have the AO Update clock pulse train routed to the gate of one of the counters and to configure that same counter as retriggerable pulse generation. You then configure the pulse delay and width in order the pulse train generated to match the frequency required.

Regards
Filipe A.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,609 Views)