From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Making A Single Clean Square Pulse with FGEN

Solved!
Go to solution

When I try to make a single square pulse in LabVIEW using FGEN with the NI PXI-5412, I find that I get a result like the image attached, witch a smaller pulse occurring instantly after the desired pulse.  I am using the VI attached (the upper window is the VI, and the two lower windows are the two VIs used in composing the main VI).  Is there a better way of doing this, one that has a cleaner output?

 

Thanks.

Download All
0 Kudos
Message 1 of 5
(3,365 Views)

Would you be able to attach your .vi files so I (and anyone else) can get a better look at your code?

I have not worked with the exact function generator you are using so I'm not sure what each of the driver-provided sub-vis do.

 

Just a thought, would you be able to tell the function generator to send out a square wave at a certain frequency, say 5Hz, then make it stop 1/(2*freq) (.1) seconds later?

This way you would get the first half of a square wave (just the half above 0) which seems like what you are looking for.

0 Kudos
Message 2 of 5
(3,352 Views)

VIs attached to this post.

 

Also, I considered something like that, but I'm afraid the timing won't be perfect, but I can give it a try.

Download All
0 Kudos
Message 3 of 5
(3,341 Views)
Solution
Accepted by topic author William.Maier

Hi William.Maier

 

To output a single pulse, use Arbitrary Waveform mode and set the triggering mode to "Single". This will output 1 period of the specified waveform.

I've attached a modified version of the "niFgen Basic Arb Waveform" shipping example that does this.

 

 

Libby B.
Applications Engineering Specialist - RF Wireless
National Instruments
Message 4 of 5
(3,302 Views)

Thanks Libby, that did the trick!

 

-Billy Maier

0 Kudos
Message 5 of 5
(3,279 Views)