beautypg.com

Ibcmd, Ibcmd -8 – Measurement Computing GPIB-488 User Manual

Page 21

background image

Chapter 3

GPIB 488.1 Library Reference

Programming Reference Manual

3-8

GPIB-488

IBCMD

Sends GPIB commands.

Syntax

C

ibcmd (int board, char cmnd[], long bytecount)

Parameters

board

is an integer containing the board handle.

cmnd

is the command string to be sent. This string is comprised of GPIB multiline commands.

These commands are listed in Appendix A,

Multiline Interface Messages

.

bytecount

is the number of command bytes to be transferred.

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.

ibcnt

,

ibcntl

will contain the number of bytes that were transferred.

ibcnt

is a 16-bit

integer.

ibcntl

is a 32-bit integer. If the requested count was greater than 64 K, use

ibcntl

instead of

ibcnt

.

Usage Notes

This routine passes only GPIB commands. It cannot be used to transmit programming
instructions (data) to devices. Use the

ibrd

and

ibwrt

routines for this purpose.

This routine terminates when any one of the following takes place:

Commands transfer is successfully completed.

An error occurs

A timeout occurs

A Take Control (TCT) command is sent

The system controller asserts the IFC (Interface Clear) line.