Chapter 4
Programming
©
National Instruments Corporation
4-17
NI PXIe-5450 User Manual
Configure Script Mode
You can use Script mode to use scripting to link and loop multiple
waveforms in complex combinations using a script.
LabVIEW Example
The procedure below provides the basic steps required to configure Script
mode. To see a more detailed example of the use of Script mode in
LabVIEW, refer to the
Fgen Arb Script.vi
example for LabVIEW.
1.
Call the niFgen Configure Output Mode VI with
Output Mode
set to
Script.
2.
Write all waveforms that are referenced in the script by calling the
niFgen Write Named Waveform VI and associate the proper names to
them.
3.
After your waveforms are written to your device, call the niFgen Write
Script VI to write the script(s) containing the generation instructions to
be executed.
The script you write can manage waveform generation based on multiple
waveforms and triggers. For example, you could download waveforms A,
B, C, and D into device memory. You could then write a script that would
wait for a trigger to initiate generation and, upon receiving this trigger,
generate waveform A three times with a marker at position 16 each time
and finally generate waveforms B, C, and D twice (BCDBCD). The
following is the script of this example:
script myFirstScript
wait until scriptTrigger0
repeat 3
generate waveformA marker0(16)
end repeat
repeat 2
generate waveformB
generate waveformC
generate waveformD
end repeat
end script
4.
(Optional) You can write multiple scripts that exist simultaneously on
your device. If you write multiple scripts to your device, you must