beautypg.com

Readstatusbyte, Readstatusbyte -14 – Measurement Computing GPIB-488 User Manual

Page 82

background image

Chapter 4

GPIB 488.2 Library Reference

Programming Reference Manual

4-14

GPIB-488

ReadStatusByte

Serial poll a single device and read its status byte.

Syntax

C

ReadStatusByte(int board, int address, short

*result)

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 an integer representing the GPIB address of the device that is to be serial polled.

Returns

result

will contain the status byte. The high byte of result is always 0.

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

None.

Example

This example serial polls the device at address 2 and retrieves its status byte.

C

short result;

ReadStatusByte (0, 2, &result);