Devclear, Devclear -3 – Measurement Computing GPIB-488 User Manual

Page 71

Advertising
background image

Chapter 4

GPIB 488.2 Library Reference

GPIB-488

4-3

Programming Reference Manual

DevClear

Clears one device.

Syntax

C

DevClear(int board, short address)

Parameters

board

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

applications, this value is 0.

address

is the GPIB address of the device to clear.

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

This routine sends the GPIB Selected Device Clear (SDC) message to the specified device.

To clear multiple devices, use the

DevClearList

routine.

If

address

is set to

NOADDR

, then all connected devices on the GPIB is cleared through the

Universal

Device Clear

(UDC) message.

Example

This example clears the device at GPIB primary address 4, secondary address 30 connected
to GPIB board 0.

C

DevClear(0, MakeAddr (4,30));

/* Use MakeAddr macro (in GPIB.H) to pack

primary and secondary address */

Advertising