Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

Single-shot waveform with FGEN library

I want to program a 5411 AWG in ANSI-C such that it plays a waveform exactly once, on each trigger.

I am using the following (using niFgen.h):

Output mode: NIFGEN_VAL_OUTPUT_ARB
Trigger mode: NIFGEN_VAL_SINGLE
Trigger source: NIFGEN_VAL_SOFTWARE_TRIG

However, when I use the above it keeps looping the waveform as soon as I send a software trigger. What am I doing wrong?

I searched around, but I can't find too much about C-programming the 5411. Also, the various Labview documents talk about "stages" in the waveform, but I can't relate that back to FGEN, unless stages are the same as single waveforms in a sequence. Are they?

Thanks,
Gwendolyn.
0 Kudos
Message 1 of 3
(6,609 Views)
You'll need to use the Arb Sequence Mode, with a sequence of only one waveform. Also, the trigger mode to use is stepped. Each time you provide a trigger, it will output your waveform once (assuming you set the loop count to 1). If you set the loop count to 2, you'll get two cycles of your waveform for each trigger you provide.

You can also have a marker go out with the waveform if you want by specifying the marker location when you create the sequence.

Output mode: NIFGEN_VAL_OUTPUT_SEQ
Trigger mode: NIFGEN_VAL_STEPPED
Trigger source: NIFGEN_VAL_SOFTWARE_TRIG

Hope this helps.

Neil F.
Signal Generators Software Developer
Neil Feiereisel
Principal Engineer, Modular Instruments, National Instruments
Message 2 of 3
(6,609 Views)
Thank you for your reply. Exactly what I needed to know: it works now!

Gwendolyn.
0 Kudos
Message 3 of 3
(6,609 Views)