beautypg.com

Ibclr, Ibclr -7 – Measurement Computing GPIB-488 User Manual

Page 20

background image

Chapter 3

GPIB 488.1 Library Reference

GPIB-488

3-7

Programming Reference Manual

IBCLR

Clears a specified device.

Syntax

C

ibclr (int device)

Parameters

device

is an integer containing the device handle.

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 GPIB Interface Board (which is currently the CIC) sends
its talk address over the GPIB. This makes it the active talker. It then unlistens all devices and
addresses the specified device as a listener. Finally, the GPIB board clears the device, by
sending the

Selected Device Clear

message.

Example

This example uses

ibdev

to return the unit descriptor for a device at PAD 5, a DMM, into the

variable dmm. The DMM is then cleared.

C

int dmm;

dmm = ibdev(0,5,0,13,1,0);

/*open instrument*/

ibclr (dmm);

/* clear it */