viGpibControlATN

NI-VISA

viGpibControlATN

Purpose

Specifies the state of the ATN line and the local active controller state.

C Syntax

ViStatus viGpibControlATN(ViSession vi, ViUInt16 mode)

Visual Basic Syntax

viGpibControlATN& (ByVal vi&, ByVal mode%)

Resource Classes

GPIB INTFC

Parameters

Name Direction Description

vi

IN

Unique logical identifier to a session.

mode

IN

Specifies the state of the ATN line and optionally the local active controller state. See the Description section for actual values.

Return Values

Completion Codes Description

VI_SUCCESS

Operation completed successfully.

 

Error Codes Description

VI_ERROR_INV_OBJECT

The given session reference is invalid.

VI_ERROR_NSUP_OPER

The given vi does not support this operation.

VI_ERROR_RSRC_LOCKED

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

VI_ERROR_NCIC

The interface associated with the given vi is not currently the controller in charge.

VI_ERROR_INV_MODE

The value specified by the mode parameter is invalid.

VI_ERROR_NSUP_MODE

The specified mode is not supported by this VISA implementation.

Description

This operation asserts or deasserts the GPIB ATN interface line according to the specified mode. The mode can also specify whether the local interface should acquire or release Controller Active status. This operation is valid only on GPIB INTFC (interface) sessions. The following table lists valid values for the mode parameter.

Mode Action Description

VI_GPIB_ATN_DEASSERT

Deassert ATN line. The GPIB interface corresponding to the VISA session goes to standby.

VI_GPIB_ATN_ASSERT

Assert ATN line and take control synchronously without corrupting transferred data. If a data handshake is in progress, ATN is not asserted until the handshake is complete.

VI_GPIB_ATN_DEASSERT_HANDSHAKE

Deassert ATN line, and enter shadow handshake mode. The local board participates in data handshakes as an Acceptor without actually reading the data. The GPIB interface corresponding to the VISA session goes to standby.

VI_GPIB_ATN_ASSERT_IMMEDIATE

Assert ATN line and take control asynchronously and immediately without regard for any data transfer currently in progress. Generally, this should be used only under error conditions.

It is generally not necessary to use the viGpibControlATN() operation in most applications. Other operations such as viGpibCommand() and viGpibPassControl() modify the ATN and/or CIC state automatically.

Related Topics

INTFC Resource

viGpibControlREN