Converts an error code returned by an NI-RFSG function into a user-readable string.

Syntax

ViStatus __stdcall niRFSG_ErrorMessage(ViSession vi, ViStatus errorCode, ViChar errorMessage[IVI_MAX_MESSAGE_BUF_SIZE])

Remarks

Supported Devices: PXI-5610, PXIe-5611, PXIe-5644/5645/5646, PXI/PXIe-5650/5651/5652, PXIe-5653/5654/5654 with PXIe-5696, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842/5860

Parameters

NameDirectionTypeDescription
vi[in]ViSession

The ViSession handle that you obtain from niRFSG_Init or niRFSG_InitWithOptions. The handle identifies a particular instrument session.

You can pass VI_NULL for this parameter. Passing VI_NULL is useful when niRFSG_Init or niRFSG_InitWithOptions fails.

Default Value: VI_NULL

errorCode[in]ViStatus

Pass the status parameter that is returned from any NI-RFSG function.

Default Value: 0 (VI_SUCCESS)

errorMessage[in]ViChar[IVI_MAX_MESSAGE_BUF_SIZE]

Returns the user-readable message string that corresponds to the status code you specify.

You must pass a ViChar array with at least 256 bytes to this parameter.

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