LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

variable phase shift between two analog output signals

Solved!
Go to solution

Hey! I would like to drive two different piezo elements with a sine-/squarewave signal and have one of the output signals phase shifted. After some trail and error, I was able to get a second analog output out of my PCI-6221 card (using LabView 8.2) that also allowed me to have different amplitudes for both signals. However, I could not get the output signals to have a different frequency and even more important for my application, to have one of the signals variably phase shifted.

Thanks for very helpful hint. I attached the .vi file of the setup I could get to run so far.

0 Kudos
Message 1 of 6
(5,269 Views)
Solution
Accepted by mhoelle

Hello!

 

A way of generating waveforms is using the Analog Waveform toolbox. I have created an example VI which is attached that shows you a way of using the Basic Function Generator VI. I have saved it for LabVIEW 8.2.

 

I hope this helps!

0 Kudos
Message 2 of 6
(5,244 Views)

Hey mhoelle,

 

Check out this Knowledgebase! The first part regarding the error doesn't seem to be pertinent to your issue. But the second part about modifying one of your Basic Function Generator.VI's to incorporate the phase shift should be very helpful for your issue.

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 3 of 6
(5,232 Views)

Hey Macaba,

what you sent me is just working awesome and exactly what i was searching for! the solution is even better than I thought I could be!

Thanks a lot and greetings from Atlanta!

 

mhoelle

0 Kudos
Message 4 of 6
(5,223 Views)

Hi macaba,

 

Sorry to bother you. I have had a run at your vi, but when I run it to generate 2 sine wave (both are 50Hz) with 120 degree phase shift, I can see from the oscilloscope that the generated sine waves are not smooth, can you tell me why it is that? Does it mean that I didn't configure the DAQ correctly?

 

Best regards,

 

Harry 

0 Kudos
Message 5 of 6
(4,301 Views)

Hi Henry,

 

It may be that you have configured the DAQ Assistant with too low a sampling rate.  As a general rule of thumb, you want to output at a sample rate about 10 times the frequency of your signal.  This means that you should use an analog output sample rate of at least 500 S/s, or higher if you want a smoother signal.  If this is not the problem, please let us know what DAQ card you are using and send us a screenshot of your DAQ Assisant settings.

 

 

Brian

Brian G.
0 Kudos
Message 6 of 6
(4,284 Views)