Clears a device.
ViStatus viClear(ViSession vi)
viClear&(ByVal vi&)
GPIB INSTR, Serial INSTR, TCPIP INSTR, TCPIP SOCKET, USB INSTR, USB RAW, VXI INSTR
Name | Direction | Description |
---|---|---|
vi |
IN |
Unique logical identifier to a session. |
Completion Codes | Description |
---|---|
VI_SUCCESS |
Operation completed successfully. |
Error Codes | Description |
---|---|
VI_ERROR_INV_OBJECT |
The given session reference is invalid. |
VI_ERROR_NSUP_OPER |
The given vi does not support this operation. |
VI_ERROR_RSRC_LOCKED |
Specified operation could not be performed because the resource identified by vi has been locked for this kind of access. |
VI_ERROR_TMO |
Timeout expired before operation completed. |
VI_ERROR_RAW_WR_PROT_VIOL |
Violation of raw write protocol occurred during transfer. |
VI_ERROR_RAW_RD_PROT_VIOL |
Violation of raw read protocol occurred during transfer. |
VI_ERROR_BERR |
Bus error occurred during transfer. |
VI_ERROR_NCIC |
The interface associated with the given vi is not currently the controller in charge. |
VI_ERROR_NLISTENERS |
No-listeners condition is detected (both NRFD and NDAC are unasserted). |
VI_ERROR_INV_SETUP |
Unable to start operation because setup is invalid (due to attributes being set to an inconsistent state). |
VI_ERROR_CONN_LOST |
The I/O connection for the given session has been lost. |
The viClear() operation clears the device input and output buffers. The bus-specific details are:
Clear for 488.2 Instruments (GPIB, VXI, TCPIP, and USB)
Clear for Non-488.2 Instruments (Serial INSTR, TCPIP SOCKET, and USB RAW)
Invoking viClear() also discards the read and write buffers used by the formatted I/O services for that session.
Related Topics