Opens a session to the device specified by VISA resource name and returns a session identifier that can be used to call any other operations of that device.


icon

Inputs/Outputs

  • cu32.png VISA Open timeout (0)

    VISA Open timeout specifies the maximum time period, in milliseconds, that VISA Open waits before returning an error. It does not set the I/O timeout.

    To specify the timeout used for future operations on the VISA session, use VISA Set Timeout.

  • cvsrn.png VISA resource name

    VISA resource name specifies the resource to be opened. The VISA resource name control also specifies the session and class.

  • cbool.png duplicate session (F)

    If duplicate session is TRUE and there is currently a session opened to the resource, another session is opened to the resource. If duplicate session is set to FALSE and a session is opened to the resource, the open session is used.

    A VISA session is a unique logical identifier used by VISA to communicate with a resource. The VISA session is maintained by the VISA resource name control and is not seen by the user.

  • cu32.png access mode

    access mode specifies how to access the device.

    This input accepts the following values.

    0VISA Defaults (default)—Open session without using an exclusive lock or loading configuration information.
    1Exclusive Lock—Acquire an exclusive lock immediately upon opening a session. If a lock cannot be acquired, the session is closed and an error is returned.
    4Load Configured Settings—Configure attributes to values specified by an external configuration utility, such as the following utilities:
    • (Windows) Measurement & Automation Explorer
    • (Mac OS X) NI-VISA Configuration
    • (Linux) visaconf
  • cerrcodeclst.png error in (no error)

    error in describes error conditions that occur before this node runs. This input provides standard error in functionality.

  • ivsrn.png VISA resource name out

    VISA resource name out is the resource to which a VISA session is opened and its class. The class matches that of the VISA resource name input.

    Refer to VISA resource name control for more information.

  • ierrcodeclst.png error out

    error out contains error information. This output provides standard error out functionality.

  • If you open a significant number of VISA sessions without closing them, you decrease the available memory resources. Close the session with the VISA Close function.

    Note This function recognizes all resource strings returned by VISA Find Resource. However, VISA Find Resource does not necessarily return all strings that you pass to this function.

    Examples

    Refer to the following example files included with LabVIEW.

    • labview\examples\Instrument IO\GPIB\GPIB with VISA functions.vi