viOpenDefaultRM

Agilent VISA.NET

viOpenDefaultRM

Syntax

viOpenDefaultRM(ViPSession sesn);

Description

This function returns a session to the Default Resource Manager resource. This function must be called before any VISA functions 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.

Note: All devices to be used must be connected and operational prior to the first VISA function call (viOpenDefaultRM). The system is configured only on the first viOpenDefaultRM per process.  If viOpenDefaultRM is first called without devices connected and then called again when devices are connected, the devices will not be recognized. You must close ALL Resource Manager sessions and reopen with all devices connected and operational.

Parameters

Name

Dir

Type

Description

sesn

OUT

ViPSession

Unique logical identifier to a Default Resource Manager session.

Return Values

Type ViStatus

This is the function return status. It returns either a completion code or an error code as follows.

Completion Code

Description

VI_SUCCESS

Session to the Default Resource Manager resource created successfully.

Error Codes

Description

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_SYSTEM_ERROR

The VISA system failed to initialize.

See Also

viOpen, viFindRsrc, viClose