Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best way to Sync Digital Output(TTL) with Analog Output?

Solved!
Go to solution

I am trying to generate Analog waveform that synchronize the rising edge of a digital signal(TTL). The ttl will be used as trigger for camera. The board I have is USB-6343X. In my draft,  I used a clock as ttl so I can tune frequency easily. Could any one tell me what's the best way to accomplish such task? My draft seems working, but I hope there's more neat way. Thanks in advance for any help!

 

Kind regards,

Eric

0 Kudos
Message 1 of 9
(5,570 Views)

Hi Econg,

 

What version of LabVIEW and DAQmx are you using?

It looks like you based your code off of two examples, what samples did you use for the code?

Justin M.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 9
(5,545 Views)
It's labview 2014, i think the DaQMx is 14.0 and up
0 Kudos
Message 3 of 9
(5,515 Views)

Hi Econg,

 

What examples did you base your code off of?

Justin M.
Applications Engineering
National Instruments
0 Kudos
Message 4 of 9
(5,497 Views)
Hi, I used pulse generation from counter and analog output
0 Kudos
Message 5 of 9
(5,488 Views)

Hi Econg,

 

You should be able to trigger your TTL output with the analog output by using the ao/StartTrigger as your trigger source on the counter task. You wouldn't have to have the extra Get Full Terminal Name.vi in your analog output task.

Here is an example using your modified code. You will have to change the cDAQ1/ao/StartTigger to *your device*/ao/StartTrigger, but it should then trigger the counter output at the exact time when the analog output starts.

counter_ao_trigger.PNG

Justin M.
Applications Engineering
National Instruments
0 Kudos
Message 6 of 9
(5,477 Views)

Thanks a lot. So how much delay is it between rising edge of ao/StartTrigger and ao/SampleClock?

0 Kudos
Message 7 of 9
(5,471 Views)
Solution
Accepted by topic author Econg

Hi Econg,

 

It should be nanoseconds, if any, as it is a hardware trigger going with a hardware clock.

Justin M.
Applications Engineering
National Instruments
0 Kudos
Message 8 of 9
(5,452 Views)

Thanks a lot!

0 Kudos
Message 9 of 9
(5,370 Views)