viTerminate
Purpose
Requests a VISA session to terminate normal execution of an operation.
C Syntax
ViStatus viTerminate(ViObject vi, ViUInt16 degree, ViJobId jobId)
Visual Basic Syntax
N/A
Resource Classes
GPIB INSTR, GPIB INTFC, GPIB-VXI INSTR, GPIB-VXI MEMACC, GPIB-VXI BACKPLANE, PXI INSTR, PXI MEMACC, PXI BACKPLANE, Serial INSTR, TCPIP INSTR, TCPIP SOCKET, USB INSTR, USB RAW, VXI INSTR, VXI MEMACC, VXI BACKPLANE, VXI SERVANT
Parameters
Name | Direction | Description |
---|---|---|
vi |
IN |
Unique logical identifier to a session. |
degree |
IN |
VI_NULL (0). |
jobId |
IN |
Specifies an operation identifier. |
Return Values
Completion Codes | Description |
---|---|
VI_SUCCESS |
Request serviced successfully. |
Error Codes | Description |
---|---|
VI_ERROR_INV_OBJECT |
The given object reference is invalid. |
VI_ERROR_INV_JOB_ID |
Specified job identifier is invalid. |
VI_ERROR_INV_DEGREE |
Specified degree is invalid. |
Description
This operation is used to request a session to terminate normal execution of an operation, as specified by the jobId parameter. The jobId parameter is a unique value generated from each call to an asynchronous operation.
If a user passes VI_NULL as the jobId value to viTerminate(), VISA will abort any calls in the current process executing on the specified vi. Any call that is terminated this way should return VI_ERROR_ABORT. Due to the nature of multi-threaded systems, for example where operations in other threads may complete normally before the operation viTerminate() has any effect, the specified return value is not guaranteed.
Related Topics