<< findAllInstruments VISA Integration Toolbox viGetAttribute >>

VISA Integration Toolbox >> VISA Integration Toolbox > viClose

viClose

Closes the specified session, or the connection to a device

Calling Sequence

status = viClose(vi)

Arguments

status

contains the return code of the operation.

vi

unique logical identifier to a session, event, or find list.

Description

The viClose() operation closes a session or a connection to a device (or an event, or a find list). In this process all the data structures that had been allocated for the specified vi are freed. Calling viClose() on a VISA Resource Manager session will also close all I/O sessions associated with that resource manager session.

Examples

[status, defaultRM] = viOpenDefaultRM();

// Connect to device located at TCPIP0::ftp.ni.com::21::SOCKET
[status, instr] = viOpen(defaultRM, "TCPIP0::ftp.ni.com::21::SOCKET", viGetDefinition("VI_NULL"), viGetDefinition("VI_NULL"));

viClose(instr);
viClose(defaultRM);

Report an issue
<< findAllInstruments VISA Integration Toolbox viGetAttribute >>