viGpibControlREN

Agilent VISA.NET

viGpibControlREN

Syntax

viGpibControlREN(ViSession vi, ViUInt16 mode);

Description

Controls the state of the GPIB REN interface line and, optionally, the remote/local state of the device. This operation asserts or deasserts the GPIB REN interface line according to the specified mode. The mode can also specify whether the device associated with this session should be placed in local state (before deasserting REN) or remote state (after asserting REN). This operation is valid only if the GPIB interface associated with the session specified by vi is currently the system controller.

An INSTR resource implementation of viGpibControlREN for a GPIB System supports all documented modes. An INTFC resource implementation of viGpibControlREN for a GPIB System supports the modes VI_GPIB_REN_DEASSERT, VI_GPIB_REN_ASSERT, and VI_GPIB_REN_ASSERT_LLO.

Parameters

Name

Dir

Type

Description

vi

IN

ViSession

Unique logical identifier to a session.

mode

IN

ViUInt16

Specifies the state of the REN line and, optionally, the device remote/local state.

Special Values for mode Parameter 

mode

 

 

Action Description

VI_GPIB_REN_ADDRESS_GTL

 

 

Send the Go To Local command (GTL) to this device.

VI_GPIB_REN_ASSERT

 

 

Assert REN line.

VI_GPIB_REN_ASSERT_ADDRESS_LLO

 

 

Address this device and send it LLO, putting it in RWLS.

VI_GPIB_REN_ASSERT_ADDRESS

 

 

Assert REN line and address this device.

VI_GPIB_REN_ASSERT_LLO

 

 

Send LLO to any devices that are addressed to listen.

VI_GPIB_REN_DEASSERT

 

 

Deassert REN line.

VI_GPIB_REN_DEASSERT_GTL

 

 

Send the Go To Local command (GTL) to this device and deassert REN line.

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

Resource attribute retrieved successfully.

Error Codes

Description

VI_ERROR_INV_MODE

The value specified by the mode parameter is invalid.

VI_ERROR_INV_SESSION
VI_ERROR_INV_OBJECT

The given session or object reference is invalid (both are the same value).

VI_ERROR_NCIC

The interface associated with this session is not currently the controller in charge.

VI_ERROR_NLISTENERS

No listeners condition is detected (both NRFD and NDAC are deasserted).

VI_ERROR_NSUP_OPER

The given vi does not support this operation.

VI_ERROR_NSYS_CNTLR

The interface associated with this session is not the system controller.

VI_ERROR_RSRC_LOCKED

Specified operation could not be performed because the resource identified by vi has been locked for this kind of access.