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.

VirtualBench

cancel
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. 

 

thanks,

Joe

Message 1 of 5
(5,076 Views)

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

——
Brandon Streiff
ni.com/compactdaq · ni.com/daq
Message 2 of 5
(5,042 Views)

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

 

Thanks,

Joe

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

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

http://zone.ni.com/reference/en-XX/help/371526A-01/vbhelp/faq_fgen_start_not_happening/

 

[2] NI-VirtualBench Specifications (page 6)

http://www.ni.com/pdf/manuals/371527d.pdf

 

[3] Dig Export Signal (VI)

http://zone.ni.com/reference/en-XX/help/374540C-01/lciviref/dig_export_signal/

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
(5,019 Views)

Joe,

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.

 

Joe

0 Kudos
Message 5 of 5
(5,012 Views)