07-22-2009 03:23 PM
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.
Solved! Go to Solution.
07-23-2009 08:12 AM
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!
07-23-2009 12:58 PM
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.
07-23-2009 02:41 PM
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
03-06-2012 05:53 AM
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
03-07-2012 12:59 PM
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