beautypg.com

Enter, Receive, Syntax – Measurement Computing GPIB-488.2 User Manual

Page 27

background image

GPIB 488.2 Porting Guide

986992

IOtech to Associated MCC APIs

3-9

IOtech GPIB Commands

Associated MCC GPIB 488.2 Command(s)

Enter

{also see the following EnterX,
EnterN, EnterMore, and
EnterNMore set of commands}

Receive

Syntax

Enter

LONG WINAPI Enter(DevHandleT devHandle,

LPBYTE data)

Receive

Receive(int board, int address,char data[],

unsigned long count, int termination)

Usage Notes

The Enter function, no longer to be used, passed the device handle, and a pointer to the data
buffer, to the EnterX function (see next entry). Enter determined the size of the data buffer
and passed that value as the count parameter. It specified forceAddr is TRUE, causing
Driver488 to re-address the device.
Receive

is used to read data from a GPIB device. The input data string is not terminated with a

zero byte.
The following example instructs to receive 50 bytes of data from the specified talker (device at
address 2, connected to board). EOI signals the end of the message.
Example:

char data[50];

Receive (0, 2, data, 50, STOPend);