LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate a high freq square wave on NI-USB 62xx

Hi,

I am trying to generate a 50khz square wave with an AO channel on the NI-USB 6212 (rated at 250ks/s AO). I started with the Voltage - Continuous Output.vi example but when i go up toward 50khz square wave (100khz sample rate) the edges of the square wave become rounded. The slew rate for the card is 5V/us and my amplitude is just .5V so i feel like I'm doing something wrong with the task setup.

 

I also tried setting continuous samples using the onboard clock for a source and then writing an array [1,-1] but that fails at anything higher than ~8khz. 

 

What's the most efficienct/correct way to set up a task like this? Any help appreciated. Thanks.

 

Matt

0 Kudos
Message 1 of 2
(2,369 Views)

Hello Matt,

 

Right now, I think that shape of the signal that is being output is being controlled by the load on the AO. 

 

If there is a very large impedance load attached between AO and ground, the RC time constant of the circuit is going to be very high.  This will result in a large amount of time required to charge and dissipate the voltage.  By increasing the frequency, the amount of time allotted for this is being reduced.  Potentially resulting in the waveform you are seeing.

 

Can you please upload a picture of your waveform?

Can you please try to reduce the load on the AO?  This can be done by disconnecting the current load and attaching a small resistor (50 Ohms should be good).  Does this result in the correct waveform?

 

Regards,

Thomas C.
FlexRIO Product Support Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,326 Views)