VISA Close Function

LabVIEW 2018 Help

Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)

LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help
LabVIEW 2020 Help

Owning Palette: VISA Advanced VIs and Functions

Requires: Base Development System

Closes a device session or event object specified by VISA resource name.

Details  Examples

VISA resource name specifies the resource to be opened. The VISA resource name control also specifies the session and class.
error in describes error conditions that occur before this node runs. With the following exception, this input provides standard error in functionality.

This node runs normally even if an error occurred before this node runs.
error out contains error information. This output provides standard error out functionality.

VISA Close Details

Error I/O operates uniquely in this function. The function closes the device session regardless of whether an error occurred in a preceding operation. For each VISA session that you open, you should close the session when you are finished with it. This function accepts all available classes.

You also can use the Open VISA Session Monitor VI in the labview\vi.lib\Utility\visa.llb to close all open VISA sessions. Alternatively, you could save work, exit, and re-enter LabVIEW. Exiting LabVIEW closes all open VISA sessions. You also can select the Automatically close VISA sessions option on the Environment page of the Options dialog box.


Refer to the following VIs for examples of using the VISA Close function:

  • Continuous Serial Write and Read VI: labview\examples\Instrument IO\Serial
  • PXI - Route Trigger VI: labview\examples\Instrument IO\VISA\PXI
  • GPIB with VISA functions VI: labview\examples\Instrument IO\GPIB
  • USB RAW - Interrupt VI: labview\examples\Instrument IO\VISA\USB


Not Helpful