beautypg.com

Enablelocal, Enablelocal -5 – Measurement Computing GPIB-488 User Manual

Page 73

background image

Chapter 4

GPIB 488.2 Library Reference

GPIB-488

4-5

Programming Reference Manual

EnableLocal

Places specified devices in local mode (Can be "programmed" from front panel controls.).

Syntax

C

EnableLocal(int board, short addresslist[])

Parameters

board

is an integer which identifies the GPIB board to be used for this operation. In most

applications, this value is 0.

addresslist

is an array of GPIB addresses, terminated by the value

NOADDR

. These

addresses identify the devices to enable locally.

Returns

ibsta

will contain a 16-bit status word as described in Appendix B,

IBSTA

.

iberr

will contain an error code, if an error occurred.

Usage Notes

When this routine is executed, the Controller addresses the specified GPIB devices as
listeners and then sends the GPIB

Go To Local

(GTL) command.

To put all devices in local mode, use an array containing only the

NOADDR

value. This

unasserts the GPIB

Remote Enable

(REN) line, thereby placing all GPIB devices in local

mode.

Example

Put the GPIB devices at addresses 6 and 7 (connected to board 0) in local mode.

C

short addresslist[3] = {6,7,NOADDR};

EnableLocal(0, addresslist);