LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I generate 2 analog outputs in phase difference?

Hello, Everyone
 
I"d like to generate 2 analog outputs and here is what I've tried.
 
Firstly, I used express vi simulate signal and DAQ assistant to do 1 analog channel output. It turned out the waveform is not smooth for high frequency >100hz.
Then I used the attached vi but found out the waveform is not smooth. I intend to have them up to 10kHz.
Can anyone here help me out? Is there any example I can follow? Thank you.
 
Regards
Steve

Message Edited by fatg on 01-19-2007 01:54 PM

0 Kudos
Message 1 of 7
(3,624 Views)
There is an input into the vi that creates your sine wave that defines the number of points and the sampling rate.  You left this unconnected so the default is 1000 points at 1000 Hz rate.  You will need to select these values for your application.  The rate will obviously be the one you enter as the sample clock.  Depending how many cycles of the sine wave you want, you will have to figure out the number of points you need.

See attached for an example that generates a single cycle for the selected frequency.

Message Edited by rpursley8 on 01-19-2007 03:33 PM

Randall Pursley
0 Kudos
Message 2 of 7
(3,619 Views)
Thank you Randall.
I think you mean the sampling info. pin of basic function generator. I just changed it and it works. The waveform is much smoother.
I just found some examples which generate analog output using waveform buffer generation vi. They support my daq card but  always report error "onboard device memory underflow" and I don't know how to solve this problem. Also I'm wondering what the difference is between these two vis(basic function generator/waveform buffer generatoion).
 
Thank you.
 
Regards
Steve
0 Kudos
Message 3 of 7
(3,609 Views)
Hello, Randall
 
I guess I have a problem here.
I'd like to generate 10kHz sine signal.  To get a smooth waveform, I need a high rate of 100kHz. But everytime it reports error like onboard device memory underflow. Is there anything I can adjust?
Thank you.
Steve
0 Kudos
Message 4 of 7
(3,599 Views)
What hardware are you using?

Go ahead and post your latest version of the software again.



Message Edited by rpursley8 on 01-22-2007 10:40 AM

Randall Pursley
0 Kudos
Message 5 of 7
(3,581 Views)

It's 6024E PCI card. I think the reason is low update rate of 10k/s. I"m using labview 8.2 with new max

 

Regards

Steve

Message Edited by fatg on 01-22-2007 09:46 AM

0 Kudos
Message 6 of 7
(3,576 Views)
That would be the reason.

If you have to use this hardware to generate the sine wave, you might take a look at the pulse width modulation example  (PWM-Counter Output.vi).  All you would need is a filter on the output to get your sine wave, but this might work for you.

Message Edited by rpursley8 on 01-22-2007 10:58 AM

Randall Pursley
0 Kudos
Message 7 of 7
(3,572 Views)