Scripting Instructions

NI RF Signal Generators Help (NI-RFSG 18.1)

Edition Date: June 2018
Part Number: 371025V-01
View Product Info

Download Help (Windows Only)

NI-RFSG 18.1 Help
NI-RFSG 18.2.1 Help
NI-RFSG 19.1 Help

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  Some waveform names allowable in NI-RFSG cannot be used with the NI Script Editor. When working with scripts, ensure that your waveform name does NOT:
  • contain spaces
  • start with a number
  • contain reserved words (such as generate or repeat)
Note 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 Note  The stream n command is supported by only the PXIe-5673E.
Note 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.

Refer to the NI Script Editor Help for more information. To view the NI Script Editor Help, Launch the NI Script Editor and select Help»NI Script Editor Help.


Not Helpful