01-12-2016 12:49 PM
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
01-13-2016 08:19 AM
Nope, sorry. The function generator only operates continuously-- there isn't a one-shot mode.
01-13-2016 08:22 AM
Well, that is a bummer. But I appreciate the response.
Thanks,
Joe
01-13-2016 11:18 AM
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:
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)
01-13-2016 11:52 AM
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