niRFSG_WriteScript
- Updated2025-10-14
- 1 minute(s) read
Writes a script to the device to control waveform generation in Script mode.
Syntax
ViStatus __stdcall niRFSG_WriteScript(ViSession vi, ViConstString script)
Remarks
First, configure your device for Script mode by calling the niRFSG_ConfigureGenerationMode function. The NI-RFSG device must be in the Configuration state before calling the niRFSG_WriteScript function.
If you are using an RF vector signal transceiver (VST) device, some script instructions may not be supported.
Supported Devices: PXIe-5644/5645/5646, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842/5860
Related Topics
Scripting Instructions–Refer to this topic for more information about VST restrictions on scripts.
Parameters
| Name | Direction | Type | Description |
|---|---|---|---|
| vi | [in] | ViSession | Identifies your instrument session. The ViSession handle is obtained from the niRFSG_Init function or the niRFSG_InitWithOptions function and identifies a particular instrument session. |
| script | [in] | ViConstString | Specifies a string containing a syntactically correct script. NI-RFSG supports multiple scripts that are selected with the NIRFSG_ATTR_SELECTED_SCRIPT attribute. Refer to Scripting Instructions for more information about using scripts. |
Returns
Returns the status code of this operation. The status code either indicates success or describes an error or warning condition. Examine the status code from each call to an instrument driver function to determine if an error occurred. To obtain a text description of the error code, call the niRFSG_GetError function. The general meaning of the status code is as follows:
Value | Meaning |
|---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |