niRFSG_InitWithOptions

NI-RFSG C Function

niRFSG_InitWithOptions

C Function Prototype

ViStatus niRFSG_InitWithOptions (ViRsrc resourceName, ViBoolean idQuery, ViBoolean resetDevice, ViConstString optionString, ViSession* vi);

Purpose

Initializes the NI-RFSG device (the upconverter module and the AWG module). This function can receive the AWG resourceName parameter through the optionString parameter.

This function performs the following initialization actions:

  • Creates a new IVI instrument driver session.
  • Opens a session to the device you specify using the resourceName parameter.
  • If the reset parameter is set to VI_TRUE, this 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.

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.
 Caution  NI-DAQmx device names are not case-sensitive. However, all IVI names, such as logical names, are case-sensitive. If you use an IVI logical name, make sure the name is identical to the name shown in the IVI Configuration Utility.


Default Value: None

idQuery ViBoolean Specifies whether you want NI-RFSG to perform an ID query.

Defined Values:
VI_TRUE (1) Perform ID query.
VI_FALSE (0)Do not perform ID query.

Default Value: VI_TRUE
reset ViBoolean Specifies whether you want the to reset the NI-RFSG device during the initialization procedure.

Defined Values:
VI_TRUE (1)Reset device.
VI_FALSE (0)Do not reset device.

Default Value: VI_FALSE
optionString ViConstString Specifies the initial value of certain attributes for the session. The following table lists the attributes and the name you pass in this parameter to identify the attribute.

Name Attribute Name
RangeCheckNIRFSG_ATTR_RANGE_CHECK
QueryInstrStatus NIRFSG_ATTR_QUERY_INSTRUMENT_STATUS
CacheNIRFSG_ATTR_CACHE
RecordCoercionsNIRFSG_ATTR_RECORD_COERCIONS
DriverSetupNIRFSG_ATTR_DRIVER_SETUP
DriverSetupNIRFSG_ATTR_SIMULATE


The format of this string consists of the following relations:
"AttributeName=Value"
where
AttributeName is the name of the attribute and
Value is the value to which the attribute will be set. To set multiple attributes, separate their assignments with a comma, as shown in the following option string:

"RangeCheck=1,QueryInstrStatus=0,Cache=1,DriverSetup=AWG:pxi1slot4"

To simulate a particular AWG module, use the following option string:

"Simulate=1,DriverSetup=AWGModel:pxi1slot4"

This option string is valid for simulation purposes only.
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:

ValueMeaning
0Success
Positive ValuesWarnings
Negative ValuesErrors