viTerminate

NI-VISA 15.0 Help

Edition Date: June 2015

Part Number: 370131S-01

»View Product Info

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, 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

VI_EVENT_IO_COMPLETION

viMoveAsync/viMoveAsyncEx

viReadAsync

VISA Resource Template

viWriteAsync

WAS THIS ARTICLE HELPFUL?

Not Helpful