viOpenDefaultRM

NI-VISA

viOpenDefaultRM

Purpose

This function returns a session to the Default Resource Manager resource.

C Syntax

ViStatus viOpenDefaultRM(ViPSession sesn)

Visual Basic Syntax

viOpenDefaultRM&(sesn&)

Resource Classes

VISA Resource Manager

Parameters

Name Direction Description

sesn

OUT

Unique logical identifier to a Default Resource Manager session.

Return Values

Completion Codes Description

VI_SUCCESS

Session to the Default Resource Manager resource created successfully.

VI_WARN_CONFIG_NLOADED

At least one configured Passport module could not be loaded.

 

Error Codes Description

VI_ERROR_SYSTEM_ERROR

The VISA system failed to initialize.

VI_ERROR_ALLOC

Insufficient system resources to create a session to the Default Resource Manager resource.

VI_ERROR_INV_SETUP

Some implementation-specific configuration file is corrupt or does not exist.

VI_ERROR_LIBRARY_NFOUND

A code library required by VISA could not be located or loaded.

Description

The viOpenDefaultRM() function must be called before any VISA operations can be invoked. The first call to this function initializes the VISA system, including the Default Resource Manager resource, and also returns a session to that resource. Subsequent calls to this function return unique sessions to the same Default Resource Manager resource.

When a Resource Manager session is passed to viClose(), not only is that session closed, but also all find lists and device sessions (which that Resource Manager session was used to create) are closed.

Related Topics

viClose

viFindRsrc

viOpen

VISA Resource Manager

VISA Resource Template