Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

phase lock

Hi all

 

I have a PCI-6251 card with LabView 7.1.1, I am trying to read a signal which is close to a sinusoid of constant frequency (about 172 Hz) but varying amplitude. The objective of the program is to generate a TTL at every rising edge of the sine wave. The time between the rising edge and the TTL should be smaller than 15 micro seconds.

 

The next requirement is to generate the TTL with a certain delay after the rising edge that corresponds to the 45, 90, 180, 270, 315 and 360 phases of the sinusoidal frequency.

 

I believe this has something to do with phase locking but I am not sure.

 

Regards

Message Edited by Reza_QMUL on 06-25-2007 10:07 AM

0 Kudos
Message 1 of 4
(3,778 Views)
Hi Reza,

If you are looking for micro-second accuracy then you can't rely on software to generate the pulses. With a frequency of 172Hz you might be able to use an analog trigger to fire off one of the counters to send out the pulses at the delays you require.

Alternatively you could use the DIO lines to generate you pulses and sync it up to the waveform you are measuring. This might involve a portion of synchronisation time at the begining of the acquisition.

Regards

Jon Bowers
NI UK & Ireland
0 Kudos
Message 2 of 4
(3,622 Views)

Hi

 

Thanks for your reply, I tried firing the counter output with analogue trigger but I get errors, I have attached the VI, I think its not possible to do analogue triggering with the digital or counter outputs, your help will be much appreciated.

 

Also I be happy as long I get one trigger per second at the rising edge (bearing in mind that I require delays that correspond to 45, 90, etc deg) of a 172 Hz analogue sine wave.

 

I have also have a program that generates a square wave with the rising edge corresponding to a rising edge of the sine wave, the oscillascope showed a very small delay between the two events, but I don’t know how to introduce delays that will correspond to the phase of the 172 Hz sine wave. This program is also attached (Cont Gen Voltage Wfm-Int Clk-Analog Start_REZA.vi)

 

regards

Message Edited by Reza_QMUL on 06-27-2007 08:55 AM

0 Kudos
Message 3 of 4
(3,604 Views)
Hi Reza,

I probably should have explained my self a little better in my previous post. When I mentioned the analog triggering I meant that you would set up an analog aquisition with an analog start trigger. You then export this trigger to a counter set up for retriggerable pulse train generation. I have attached an example of this. If you connect your sine wave to ai0 and then monitor CRT 0 OUT (should be pin 2). You should see (assuming your sine wave crosses zero) an edge generated at the zero crossing and one slightly later. You can adjust the number of pulses and delays between them from the front panel controls.

I hope this helps.

Regards

Jon
0 Kudos
Message 4 of 4
(3,384 Views)