Rcvrespmsg, Rcvrespmsg -13 – Measurement Computing GPIB-488 User Manual
Page 81
Chapter 4
GPIB 488.2 Library Reference
GPIB-488
4-13
RcvRespMsg
Reads data from a previously addressed device.
Syntax
C
RcvRespMsg(int board, char data[], long count,
int termination)
Parameters
board
is an integer which identifies the GPIB board to be used for this operation. In most
applications, this value is 0.
count
specifies the maximum number of data bytes which are to be read.
termination
is the flag used to signal the end of data. If
termination
equals a value
between 0 and 00FF hex, the corresponding ASCII character is the termination character. The
read is stopped when this character is detected. If
termination
=
STOPend
(A constant
defined in the header file), then the read is stopped when EOI is detected.
Returns
data
is the string that receives the data.
ibsta
will contain a 16-bit status word as described in Appendix B,
.
iberr
will contain an error code, if an error occurred.
Usage Notes
You must address the appropriate devices as Listeners/Talkers prior to calling this routine.
The input data string is not terminated with a zero byte.
Example
A previously addressed Listener receives 50 bytes of data from a previously addressed Talker.
The transmission is terminated when EOI is detected.
C
char data[50];
RcvRespMsg(0, data, 50, STOPend)