![National Instruments NI PXIe-5450 User Manual Download Page 84](http://html2.mh-extra.com/html/national-instruments/ni-pxie-5450/ni-pxie-5450_user-manual_3486740084.webp)
Chapter 2
NI 5450 Overview
©
National Instruments Corporation
2-61
NI PXIe-5450 User Manual
2.
Write all waveforms that are referenced in the script by calling the
niFgen Write Named Waveform VI or one of the niFgen Write Named
Waveform Functions and associate the proper names to them.
3.
After your waveforms are written to your device, call the niFgen Write
Script VI or the
niFgen_WriteScript
function 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
select the one you wish to execute by setting the Script to Generate
property or the
NIFGEN_ATTR_SCRIPT_TO_GENERATE
attribute.
5.
Call the niFgen Initiate Generation VI, or the
niFgen_InitiateGeneration
function to execute the selected
script.
Note
Internally, the script stores physical device memory locations to refer to named
waveforms. Thus, you must write all waveforms to the device
before
writing the script, or
the device does not know where the waveform is located. The niFgen Initiate Generation
VI or the
niFgen_InitiateGeneration
function produces an error if this rule is
violated. If you delete waveforms and rewrite them, rewrite the script to update it with the
new locations, even if the script text has not changed.