Script Mode
Script mode allows you to use scripting to link and loop multiple waveforms in complex combinations.
Call the niFgen Configure Output Mode VI or the niFgen_ConfigureOutputMode function to switch to script mode.
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.
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. Multiple scripts can 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. Call the niFgen Initiate Generation VI, or the niFgen_InitiateGeneration function to execute the selected script.
Notes 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. | |
In some cases at high Sample clocks, your script may result in an underflow error. Underflow errors in a script can be created by waveform size, marker placement, and specific script instructions. To avoid underflow errors, refer to the minimum waveform size in your device specifications. |
Related Topics: