beautypg.com

Talk, Talk receivesetup, Syntax – Measurement Computing GPIB-488.2 User Manual

Page 59

background image

GPIB 488.2 Porting Guide

986992

IOtech to Associated MCC APIs

3-41

IOtech GPIB Command

Associated MCC GPIB 488.2 Command

Talk ReceiveSetup

Syntax

Talk

INT WINAPI Talk(DevHandleT devHandle,

BYTE primary,BYTE secondary);

ReceiveSetup

ReceiveSetup(int board, short address))


Usage Notes

Talk – No longer to be used. Was used to address an external device to Talk.

ReceiveSetup – In order to actually transfer any data, you must call a routine such as
RcvRespMsg following this routine. This routine is useful in instances where you need to
transfer multiple blocks of data between devices. For example, you could initially address the
devices using ReceiveSetup, then make multiple calls of RcvRespMsg to transfer the data.
For typical cases, Receive is simpler to use, since it takes care of both the setup and the data
transfer. Note that 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 to send the data..
The following example instructs a GPIB device at address 5 to send data to GPIB Board 0. Up
to 50 bytes of data is received and then stored in a string. The message is terminated with an
EOI.

Example:

char message[100];

ReceiveSetup(0, 5);

RcvRespMsg (0, message, 50, STOPend);