LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

After measuring the frequency of a analog signal, send out another analog signal with a fixed phase difference--could you please help me?

Hi,
 
After measuring the frequency of an analog signal (AI), I need to send out another analog signal (AO) with a fixed phase difference with the measured analog signal and the same frequency. I use a while loop. Since the phase measured in each loop is different (keeps changing for different loop), how can I send an analog signal with a fixed phase difference simultaneously?
 
I'm using LabVIEW 7.1 and PCI-6110.
 
Thank you very much!
 
Marlon
0 Kudos
Message 1 of 11
(3,924 Views)
Hi Marlon,

look at this link: http://forums.ni.com/ni/board/message?board.id=250&message.id=24206&requireLogin=False

Maybe you will find there a solution


Plamen
National Instruments Germany
Application Engineer
0 Kudos
Message 2 of 11
(3,913 Views)

Hi Marlon,

A good example of Synchronizing AI-AO can be found in the LabVIEW shipping examples (Help >> Find Examples >> Hardware Input and Output >> DAqmx >> Synchronization >> Multi-Function >> Multi-Function-Synch AI-AO.vi). An example of getting a frequency measurement from an AI channel can be found in the following knowledgebase: Making a Frequency Measurement with an Analog Input Channel. I would suggest combining these two examples in a way such that you acquire the frequency, and then using the Basic Function Generator.vi to create your new signal to output, as it has inputs for frequency and phase.

Regards,


David L.
Systems Engineering
National Instruments
0 Kudos
Message 3 of 11
(3,894 Views)
I tried to use Advanced Single Tone Measurements.vi, which can measure the frequency of a sinusoidal signal very well. However, the measured phase always shifts for each iteration (i.e., each second) WITHIN ONE RUN(the measured frequency is not in integral Hz, so the first point of the next iteration is at a location different from the location of the first point of the current iteration. I guess this is the reason...). How can I get a almost fixed phase measurement for the same signal? Thank you very much!
0 Kudos
Message 4 of 11
(3,815 Views)

HI Marlon,

I would like to ask for screenshots and a simple example program to demonstrate what you are seeing. I looked at the ‘Tone Measurements.vi’, but am having a hard time reproducing what you are seeing.

Regards,

David L.
Systems Engineering
National Instruments
0 Kudos
Message 5 of 11
(3,793 Views)

Hi, David:

I can use a vi kinda like the attached example to get a detected AI based the AO in the vi. Then, I need to send out ANOTHER AO (add a new AO) which has a fixed phase difference with the detected AI. Could anybody throw some lights on this problem for me?
Your reply will be appreciated very much!
 
Thank you!
0 Kudos
Message 6 of 11
(3,764 Views)

Hi Marlon,

I have found a forum that discusses in great detail the task that you are attempting to complete. Please refer to this forum and let us know if you require further assistance.

JaceD
Signal Sources Product Support Engineer
National Instruments
0 Kudos
Message 7 of 11
(3,742 Views)
In my application, I have a steel cantilever beam with two shakers contact it and a sensor at the tip of the beam. I wanna use the setup to do the following:
1. Sending out an analog output sinusoidal signal (A1, F1 and P1) to ONE shaker and measuring the vibration of the beam at the sensor location by obtaining the analog input sinusoidal signal (A1', F1' and P1');
2. Sending out another output analog sinusoidal signal (A2, F2 and P2) to ANOTHER shaker with a corresponding amplitude, the same frequency (F2=F1') and a phase with fixed phase difference with the measured one, i.e., P1'. 
 
Now, I made a vi (please find the attachment) which has two analog outputs and one analog input. However, when I run it, I got "Error-50103 occurred at DAQmx Write (Analog Wfm 1Chan NSamp).vi     Possible reason(s): The specified resource is reserved. The operation could not be completed as specified." Could you please take a look and throw some lights for me?
 
Thank you!
 
0 Kudos
Message 8 of 11
(3,692 Views)

HI

The reason that you are receiving the error is you are attempting to use two task of the same type on the same device. You will need to combine these tasks into one task in order to accomplish this. This is further explained in this Knowledgebase entry. I believe you are encountering case 3. I hope this helps!



Message Edited by jaced on 12-19-2007 10:56 AM
JaceD
Signal Sources Product Support Engineer
National Instruments
0 Kudos
Message 9 of 11
(3,666 Views)

Thank you, Jaced! I'll read it first.

Merry Christmas and all the best to you and your family!

0 Kudos
Message 10 of 11
(3,660 Views)