Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

AO squarewave with 1 microsecond pulse width

Im trying to create a squarewave with a pulse width of 1 microsecond and a period of 2 microseconds (50% duty cycle). So far I have been trying to use what code i can get off the NI site to help me with this, but so far no luck. I have a PXI-6025E running off the PXI-8176 controller. Can anyone point me in teh right direction? Or possibly if theres a VI I skipped over that might have the answer.

Thanks,
-Mark
0 Kudos
Message 1 of 3
(6,206 Views)
Mark,

There is an example which ships with LabVIEW titled "Function Generator.vi". You may also find this on our website at the following link.

Simple Function Generator Example
http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3D82956A4E034080020E74861&p_node=DZ52311&p_submitted=N&p_rank=&p_answer=&p_source=External

Change the waveform type on the front panel to Square Wave. If you wish to change the duty cycle, from the default of 50%, then you will have to go to the block diagram and set the % duty cycle input of the Compute Waveform VI in the middle of the diagram.

This example will work with any E Series device, which includes the NI 6025E. Keep in mind that a period of 2uS is an output rate of 500kHz. The NI 6
025E only has an analog output rate of 10kHz. You will need to consider different hardware if you wish to achieve an analog output frequency of 500kHz. However, if your square wave is TTL (0V and 5V) then you should just use your board's counters. They will be able to perform this frequency generation easily.

DAQ-STC: Generating a Continuous Pulse Train (Intermediate-Level VIs)
http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3EB0B56A4E034080020E74861&p_node=DZ52328&p_submitted=N&p_rank=&p_answer=&p_source=External


Regards,
Justin Britten

Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(6,205 Views)
Thanks a lot! Really helped me out.

-Mark
0 Kudos
Message 3 of 3
(6,206 Views)