Cilxs_clearerror – AMETEK Ls Series Driver Manual User Manual
Page 37

IVI Driver Manual
Lx / Ls Series
33
ciLxs_ClearError
ViStatus ciLxs_ClearError (ViSession instrumentHandle);
Purpose
This function clears the error code and error description for the IVI
session. If the user specifies a valid IVI session for the instrument
handle parameter, this function clears the error information for the
session. If the user passes VI_NULL for the Vi parameter, this function
clears the error information for the current execution thread. If the Vi
parameter is an invalid session, the function does nothing and returns an
error.
The function clears the error code by setting it to VI_SUCCESS. If the
error description string is non-NULL, the function de-allocates the error
description string and sets the address to VI_NULL.
Maintaining the error information separately for each thread is useful if
the user does not have a session handle to pass to the ciLxs_GetError
function, which occurs when a call to ciLxs_init or ciLxs_InitWithOptions
fails.
Parameter List
instrumentHandle
Variable Type ViSession
The ViSession handle that you obtain from the ciLxs_init or
ciLxs_InitWithOptions function. The handle identifies a particular
instrument session.
Default Value: None
Return Value
Returns the status code of this operation. The status code either
indicates success or describes an error or warning condition. You
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
ciLxs_error_message function. To obtain additional information about
the error condition, call the ciLxs_GetError function. To clear the
error information from the driver, call the ciLxs_ClearError
function.
The general meaning of the status code is as follows:
Value Meaning
-------------------------------
0 Success
Positive Values Warnings
Negative Values Errors
This driver defines the following status codes: