NI RFSA General Functions - ni/grpc-device GitHub Wiki

General Functions

niRFSA_init

ViStatus niRFSA_init(ViRsrc resourceName, ViBoolean IDQuery, ViBoolean reset, ViSession* vi);

Purpose

Creates a new session for the device. This function sends initialization commands to reset all hardware modules to a known state necessary for NI-RFSA operation.

To create a new session, pass the downconverter resource name for the RF vector signal analyzer to the resource name parameter.

You can access the device session this function creates using the NI-RFSA Soft Front Panel (SFP). Accessing the device session with the SFP can help you debug your code. Refer to Debugging Your Application Using SFP Session Access for more information about accessing your session with the SFP.

Note Note  Before initializing your device, you must first associate the modules that comprise your device in MAX. After associating the modules, pass the resource name of the device to this function to initialize all the modules. Refer to Associating NI-RFSA Modules for information about MAX association.
Supported Devices: PXI-5600, PXIe-5601/5603/5605/5606 (external digitizer mode), PXIe-5644/5645/5646, PXI-5661, PXIe-5663/5663E/5665/5667/5668, PXIe-5693/5694/5698, PXIe-5820/5830/5831/5832/5840/5841

Parameters

Input
Name Type Description
resourceName ViRsrc

Specifies the resource name of the device to initialize.

For NI-RFSA devices, the syntax is the device name specified in MAX. The typical default name for your device in MAX is PXI1Slot2. You can rename your device by right-clicking the name in MAX, selecting Rename from the drop-down menu, and entering a new name. You can also pass in the name of an IVI logical name configured with the IVI Configuration utility. For additional information, refer to the Installed Devices»IVI topic of the Measurement & Automation Explorer Help.

Note  Device names are not case-sensitive. However, IVI logical names are case-sensitive. If you use an IVI logical name, verify the name is identical to the name shown in the IVI Configuration Utility.

| :- | :- | :- | |IDQuery|ViBoolean|Specifies whether NI-RFSA performs an ID query. When you perform an ID query, NI-RFSA verifies the device you initialize is supported. |

VI_TRUE (Yes) Perform an ID query. This value is the default.
VI_FALSE (No) Do not perform an ID query.

| :- | :- | :- | |reset|ViBoolean|Specifies whether the NI-RFSA device is reset during the initialization procedure.|

VI_TRUE (Yes) The device is reset.
VI_FALSE (No) The device is not reset. This value is the default.

| :- | :- | :- | |Output||| |Name|Type|Description| |vi|ViSession|Identifies your instrument session.|

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 NI-RFSA function to determine if an error has occurred.

To obtain a text description of the status code and additional information about the error condition, call the [niRFSA_GetError](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_GetError.html')) function. To clear the error information from NI-RFSA, call the [niRFSA_ClearError](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ClearError.html')) function.

The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

| :- | :- | :- |

niRFSA_InitWithOptions

ViStatus niRFSA_InitWithOptions(ViRsrc resourceName, ViBoolean IDQuery, ViBoolean reset, ViConstString optionString, ViSession* newVi);

Purpose

Creates a new session for the device. This function sets the initial value of certain attributes and sends initialization commands to reset all hardware modules to a known state necessary for NI-RFSA operation.

To create a new session, pass the downconverter resource name for the RF vector signal analyzer to the resource name parameter.

You can access the device session this VI creates using the NI-RFSA Soft Front Panel (SFP). Accessing the device session with the SFP can help you debug your code. Refer to Debugging Your Application Using SFP Session Access for more information about accessing your session with the SFP.

Supported Devices: PXI-5600, PXIe-5601/5603/5605/5606 (external digitizer mode), PXIe-5644/5645/5646, PXI-5661, PXIe-5663/5663E/5665/5667/5668, PXIe-5693/5694/5698, PXIe-5820/5830/5831/5832/5840/5841

Related Topics

Driver Setup Options

Parameters

Input
Name Type Description
resourceName ViRsrc

Specifies the resource name of the device to initialize.

For NI-RFSA devices, the syntax is the device name specified in MAX. The typical default name for your device in MAX is PXI1Slot2. You can rename your device by right-clicking the name in MAX, selecting Rename from the drop-down menu, and entering a new name. You can also pass in the name of an IVI logical name configured with the IVI Configuration utility. For additional information, refer to the Installed Devices»IVI topic of the Measurement & Automation Explorer Help.

Note  Device names are not case-sensitive. However, IVI logical names are case-sensitive. If you use an IVI logical name, verify the name is identical to the name shown in the IVI Configuration Utility.

| :- | :- | :- | |IDQuery|ViBoolean|Specifies whether NI-RFSA performs an ID query. When you perform an ID query, NI-RFSA verifies the device you initialize is supported. |

VI_TRUE (Yes) Perform an ID query. This value is the default.
VI_FALSE (No) Do not perform an ID query.

| :- | :- | :- | |reset|ViBoolean|Specifies whether the NI-RFSA device is reset during the initialization procedure.|

VI_TRUE (Yes) The device is reset.
VI_FALSE (No) The device is not reset. This value is the default.

| :- | :- | :- | |optionString|ViConstString|Sets the initial value of certain attributes for the session. The attributes shown in the following table are used in this parameter.|

Name Attribute
RangeCheck NIRFSA_ATTR_RANGE_CHECK
QueryInstrStatus NIRFSA_ATTR_QUERY_INSTRUMENT_STATUS
Cache NIRFSA_ATTR_CACHE
RecordCoercions NIRFSA_ATTR_RECORD_COERCIONS
DriverSetup NIRFSA_ATTR_DRIVER_SETUP
Simulate NIRFSA_ATTR_SIMULATE

The format of this string is "AttributeName=Value", where AttributeName is the name of the attribute and Value is the value to which the attribute will be set. For example, you can simulate the PXIe-5663 using the following strings:

"Simulate=1, DriverSetup=Model:5663E".

"Simulate=1, DriverSetup=Model:5601; Digitizer:5622; LO:5652; LOBoardType:PXIe".

To set multiple attributes, separate their assignments with a comma.

Refer to Driver Setup Options for more information about the driver setup string.

Note Note   To simulate a device using the PXIe-5622 25 MHz digitizer, set the Digitizer field to 5622_25MHz_DDC and the Simulate field to 1. You can set the Digitizer field to 5622_25MHz_DDC only when using the PXIe-5665.

| :- | :- | :- | |Output||| |Name|Type|Description| |vi|ViSession|Identifies your instrument session.|

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 NI-RFSA function to determine if an error has occurred.

To obtain a text description of the status code and additional information about the error condition, call the [niRFSA_GetError](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_GetError.html')) function. To clear the error information from NI-RFSA, call the [niRFSA_ClearError](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ClearError.html')) function.

The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

| :- | :- | :- |

niRFSA_close

ViStatus niRFSA_close(ViSession vi);

Purpose

Closes the session to the device.

If you close a session that has Soft Front Panel (SFP) session access enabled, any application connected to the shared device session is no longer usable. Refer to Debugging Your Application Using SFP Session Access for more information about using SFP session access.

Supported Devices: PXI-5600, PXIe-5601/5603/5605/5606 (external digitizer mode), PXIe-5644/5645/5646, PXI-5661, PXIe-5663/5663E/5665/5667/5668, PXIe-5693/5694/5698, PXIe-5820/5830/5831/5832/5840/5841

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the [niRFSA_init](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_init.html')) or [niRFSA_InitWithOptions](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_initWithOptions.html')) function.

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 NI-RFSA function to determine if an error has occurred.

To obtain a text description of the status code and additional information about the error condition, call the [niRFSA_GetError](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_GetError.html')) function. To clear the error information from NI-RFSA, call the [niRFSA_ClearError](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ClearError.html')) function.

The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

| :- | :- | :- |

⚠️ **GitHub.com Fallback** ⚠️