Ivi_DequeueInstrSpecificError
Usage
ViStatus Ivi_DequeueInstrSpecificError(ViSession vi, ViInt32* instrumentError, ViChar errorMessage[ ]);
Purpose
This function retrieves the error code and description string from the oldest entry in the instrument-specific error queue. It also removes the entry from the queue.
Use the instrument-specific error queue if querying the instrument for its status causes the instrument to lose the error value. In your check status callback, call Ivi_QueueInstrSpecificError to insert the instrument error code in the queue, and then return the IVI_ERROR_INSTR_SPECIFIC error code from the callback. In your PREFIX_error_query function, call Ivi_InstrSpecificErrorQueueSize to determine if there is an error in the queue. If not, invoke the check status callback directly. In either case, if there is an error, call Ivi_DequeueInstrSpecificError to retrieve it.
Parameters
Name | Type | Description |
---|---|---|
vi | ViSession |
The ViSession handle that you obtain from Ivi_SpecificDriverNew. The handle identifies a particular IVI session. |
instrumentError | ViInt32* |
Returns the error code from the oldest entry in the instrument-specific error queue. If you are not interested in this value, pass VI_NULL. |
errorMessage | ViChar[ ] |
Returns the error message from the oldest entry in the instrument-specific error queue. If you are not interested in this value, pass VI_NULL. Otherwise, pass a ViChar array that contains at least IVI_MAX_MESSAGE_BUF_SIZE (256) bytes. |
Return Value
Contains the status code that the function call returns. IVI engine functions can return error and warning values from several sets of status codes. Some status codes are unique to the IVI engine. Other status codes are the same codes that VISA Library functions return. Still others are error or warning values that functions in specific instrument drivers return. Each set of status codes has its own numeric range.
Regardless of the source of the status code, 0 always indicates success, a positive value indicates a warning, and a negative value indicates an error.