Prefix_reset
ViStatus Prefix_reset (ViSession vi);
Purpose
Places the instrument in a known state. In an IEEE 488.2 instrument, the _reset function sends the command string "*RST" to the instrument. Prefix_reset also sends the default setup commands to the instrument to configure settings for the proper operation of the instrument driver. You can either call the Prefix_reset function separately, or you can select it to be called from the Prefix_init function.
Parameter
Input | ||
Name | Type | Description |
---|---|---|
vi | ViSession | Unique identifier for an IVI session. |
Return Values
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.
Related Topic
Implementation Requirements
Call Ivi_LockSession to lock the IVI session.
If simulation is disabled, send the reset command to the instrument. On IEEE 488.2 instruments, you do this by sending the *RST command. Remember to call Ivi_SetNeedToCheckStatus with VI_TRUE before you perform the instrument I/O.
Send the default setup commands to the instrument. It is best to have an internal Prefix_DefaultInstrSetup function for this purpose. Prefix_IviInit must call Prefix_DefaultInstrSetup when it does not call Prefix_Reset.
Finally, call Ivi_UnlockSession to unlock the IVI session.
Be sure to document the state in which the Prefix_reset function places the instrument. Include the information in the function panel help for the Prefix_reset function.