beautypg.com

Measurement Computing GPIB-488 User Manual

Page 46

background image

Chapter 3

GPIB 488.1 Library Reference

GPIB-488

3-33

Programming Reference Manual

For example, if the PPE byte 01101011 (hex 6B) is sent, the device will drive DIO4 true if its
IST bit = 1, or false if its IST bit = 0.

If

command

is 0 or represents a PPD (Parallel Poll Disable) message, the current PPE

(Parallel Poll Enable) configuration is cancelled. Valid PPD messages range from 70 to 7F
hex. The PPD is of a similar format to the PPE byte, for example:

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. Contains the previous value of

command

if no error occurs.

Usage Notes

If

boarddev

specifies a GPIB interface board, this routine sets the board's Local Poll Enable

(LPE) message to

command

.

If

boarddev

specifies a device, the GPIB Interface Board associated with the device

addresses itself as a Talker, unlistens all devices (sends a UNL), addresses the specified device
as a Listener, and sends the PPC command followed by a PPE or PPD command.

Example

This example configures a device at PAD 2 to send DIO7 true if its IST bit = 1.

C

int dev2;

dev2 = ibdev (0,2,0,13,1,0);

ibppc (dev2, 0x6B);

0

1

0

DIO3

0

0

1

DIO2

0

0

0

DIO1

7

6

5

4

3

2

1

0

0

1

1

0

SENSE

P2

P1

P0

Table 3-5. Values for P2–P0

P2

P1

P0

GPIB Data Line