beautypg.com

Ibwait, Ibwait -50 – Measurement Computing GPIB-488 User Manual

Page 63

background image

Chapter 3

GPIB 488.1 Library Reference

Programming Reference Manual

3-50

GPIB-488

IBWAIT

Forces application program to wait for a specified event(s) to occur.

Syntax

C

ibwait (int boarddev, int mask)

Parameters

boarddev

is an integer containing the board or device handle.

mask

specifies the events that

ibwait

will wait for. Each bit in mask represents a different

event. These bits are the same as the bits in

ibsta

positions.

For more information regarding

ibsta

, see Appendix B,

IBSTA

.

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

Because the mnemonic for each bit of

ibsta

is defined as a constant within the header file,

you can elect to use the mnemonic rather than the hex value. If

TIMO

is set,

ibwait

returns

if the event does not occur within the timeout period of the device.

If a GPIB interface board is specified, the

RQS

bit is not applicable.

Bit

15

14

13

12

11

10

9

8

Event

ERR

TIMO

END

SRQI

RQS

CMPL

Bit

7

6

5

4

3

2

1

0

Event

LOK

REM

CIC

ATN

TACS

LACS

DTAS

DCAS