Showing results for 
Search instead for 
Did you mean: 

Is there a way to make the FGEN generate my waveform buffer just once?

Basically, I have a buffer that makes up a pulse. I have been sucessful loading that buffer into the FGEN using LV code. But the FGEN repeats the buffer over and over until I run the stop VI. I want to have the FGEN generate just one pulse until I load the buffer again or provide some other type of signal. I would be happy just running the VI again.  


I tried using a software timer to wait for the pulse to complete and then run the stop VI but that doesn't work. The pulse buffer is only about 10msec long and a simple delay is just not going to cut it. 




Message 1 of 5

Nope, sorry. The function generator only operates continuously-- there isn't a one-shot mode.

Brandon Streiff ·
Message 2 of 5

Well, that is a bummer. But I appreciate the response.




0 Kudos
Message 3 of 5

If you're willing to make a small external circuit, you can get single-shot behavior by using the FGEN Start signal as an input for that circuit.


The FGEN Start signal is generated every time the output buffer completes [1] -- it's like a 'cycle complete' signal. Use that pulse to disconnect the FGEN from your device. Detect whether the single-shot has ocurred using a GPIO line as input to read a state bit on the circuit, and reconnect the FGEN to your device by using another GPIO line as ouput. In summary, this circuit has two inputs and one output:

  • (in) FGEN start, to disconnect the FGEN from your device
  • (in) GPIO line, to connect the FGEN to your device
  • (out) TTL level, to indicate the state of the connection

Parts wise, consider using an analog multiplexer as the switch: input A to the MUX would be the FGEN, and input B would be ground (or some other "safe" level for your device). The rest of the circuit can use logic gates and a flip-flop or two to implement the control logic.


Power wise, you might be able to use the GPIO's 3.3 V source line if your circuit draws less than 20 mA [2], or use the DC Power Supply if you need more current.


The API has an entrypoint for exporting the FGen Start signal on the TRIG BNC terminal [3].


[1] NI-VirtualBench FGEN Help


[2] NI-VirtualBench Specifications (page 6)


[3] Dig Export Signal (VI)

Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
Message 4 of 5


Thank you for that info. I had actually considered investigating something like this. So, thank you for doing that work for me. 🙂


But I think anything like this is probably going to be more work that it is worth.


Thanks again though.



0 Kudos
Message 5 of 5