niRFSG_init
C Function Prototype
ViStatus niRFSG_init (ViRsrc resourceName, ViBoolean idQuery, ViBoolean resetDevice, ViSession* vi);
Purpose
Initializes the NI-RFSG device and performs the following initialization actions:
- Creates a new instrument driver session.
- Opens a session to the device you specify for the resourceName parameter.
- If the reset parameter is set to VI_TRUE, the niRFSG_init function resets the device to a known state.
- Returns a ViSession handle that you use to identify the NI-RFSG device in all subsequent NI-RFSG function calls.
Note Before initializing the NI 5670/5671/5672, an NI 5421/5441/5442 arbitrary waveform generator (AWG) module must be associated with the NI 5610 upconverter module in MAX. After association, pass the NI 5610 upconverter module device name to this function to initialize both modules. To change the AWG association, modify the NI 5610 Properties page in MAX, or use the niRFSG_InitWithOptions function to override the association in MAX. For more information about MAX association, refer to the NI RF Signal Generators Getting Started Guide. |
Supported Devices: NI 5650/5651/5652/5670/5671/5672
Parameters
Input | ||||||
Name | Type | Description | ||||
resourceName | ViRsrc | Specifies the resource name of the device to initialize.
For NI-DAQmx devices, the syntax is the device name specified in MAX. Typical default names for NI-DAQmx devices in MAX are Dev2 or PXISlot2. You can rename an NI-DAQmx device by right-clicking on the name in MAX and entering a new name. You can also specify the name of an IVI logical name configured with the IVI Configuration utility. For additional information, refer to the IVI Drivers topic of the MAX Help.
Default Value: None |
||||
idQuery | ViBoolean | Specifies whether you want NI-RFSG to perform an ID query. Defined Values:
Default Value: VI_TRUE |
||||
reset | ViBoolean | Specifies whether you want the to reset the NI-RFSG device during the initialization procedure. Defined Values:
Default Value: VI_FALSE |
||||
Output | ||||||
Name | Type | Description | ||||
vi | ViSession* | Returns a ViSession handle that you use to identify the NI-RFSG device in all subsequent NI-RFSG function calls. |
Return Value
Name | Type | Description | ||||||||
status | ViStatus | 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 status code, call the niRFSG_error_message function. To obtain additional information about the error condition, call the niRFSG_GetError function. To clear the error information from the driver, call the niRFSG_ClearError function. The general meaning of the status code is as follows:
|