Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronize analog output signal frequency to be same as analog input signal frequency

Hi all,

 

I have a case in which I generate a Square wave (on analog output ) to trigge rthe camera whenever there is analog input signal present (trigger), I use basic level trigger  detection vi, and on true case of it I generate an oputput waveform. I use waveform generator vi to generate the output pulse. 

 

but what I need is to generate the output pulse at the falling edge of the input pulse,  meaning on each input pulse i need an output pulse.

how can I match or synchronize the frequency of the both signal. I need to control the amplitude of the output pulse, but frequency to be same as input pulse.

attach is my vi. please let me know.

 

 

0 Kudos
Message 1 of 4
(4,114 Views)

Hey,

 

Since this is just a pulse, is there any reason you are doing this with an analog output instead of a digital or counter input? It would seem that you could use the input trigger as a clock input on a counter to cause the two signals to be synchronized.

 

 

Matt W.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(4,085 Views)

@MegaWatts wrote:

Hey,

 

Since this is just a pulse, is there any reason you are doing this with an analog output instead of a digital or counter input? It would seem that you could use the input trigger as a clock input on a counter to cause the two signals to be synchronized.

 

 


I need analog output as my camera can only be trigger by an analog/ttl signal and my input signal is also analog (voltage).  is there example on using input trigger as clock? I am new to this kind of programming.

 

I dint know how to extract the frequency of the input signal match it with the output signal.

 

my input signal is -0.1 v with variable 200hz frequency with a pulse width of a 4 microsecond,

 

my camera needs atleast 1.5 v pulse for trigger and I want it to trigger at the falling edge of the input pulse.

 

 

0 Kudos
Message 3 of 4
(4,082 Views)

Hey,

 

I'm not sure that there is a specific shipping example, but you would basically use the DAQmx Timing.vi and set the clock source to be an external PFI line or where ever the trigger is coming from. This is assuming the trigger will behave like a clock in that it is in regular intervals.

Matt W.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(4,059 Views)