Scripting Instructions
- Updated2024-09-12
- 2 minute(s) read
Scripting Instructions
Scripts consist of five primary instructions: generate, repeat/end repeat, wait, if/else/end if, and clear. Additionally, all instructions in a script are surrounded by the keywords script script name/end script. Multiple scripts can exist on the device at one time—you can choose which script to execute by referencing the script name.
For examples of scripting applications, refer to Common Scripting Use Cases.
Note The wait instruction on the PXI-5670/5671 and PXIe-5672 has different
behavior based on whether the digital upconverter (DUC) is enabled or not. The wait
instruction normally holds the last sample out of the memory. If the DUC is disabled,
this translates to a DC value, which is filtered by the PXI-5610 front end. If the DUC is enabled, the last sample is multiplied by
the numerically controlled oscillator (NCO), which produces a sine tone at the specified
carrier frequency. These considerations only apply when the PXI-5671 specified I/Q rate is less than or equal to 8.33 MS/s.
Note The stream n command is supported by only the PXIe-5673E.
Note If you are using an NI vector signal transceiver (VST), the following restrictions for
scripts apply:
- if else is not supported.
- break instruction is not supported.
- stream instruction is not supported.
- The maximum compiled script size is 6,100 instructions. Each script language instruction requires roughly one compiled instruction, plus one instruction for each marker.
- Nested repeats are only allowed if the outer repeat is a repeat forever instruction, and there are no other instructions preceding it or past the end of the repeat block. You can only use a single nesting level.
- Markers are allowed in generate and finite wait instructions. They are not allowed in conditional wait instructions.