beautypg.com

Sendeoi, Spoll – Measurement Computing Personal488 rev.3.0 For DOS & Windows 3.Xi User Manual

Page 361

background image

15B. Driver488/SUB, W31, W95, & WNT

III. COMMAND REFERENCES - 15. Command References

III-346

Personal488 User’s Manual, Rev. 3.0

SEE ALSO

SendCmd, SendEoi

EXAMPLES

char data[] = “W0X”;
errorcode = SendData(ieee, data, strlen (data));

The

SendData

command provides byte-by-byte control of data transfers and gives greater flexibility

than the other commands. This command can specify exactly which operations Driver488 executes.

SendEoi

SYNTAX

int pascal SendEoi(DevHandleT devHandle, unsigned char *data,

int len);

devHandle

refers to an interface handle.

data

points to a string of data bytes to be sent.

len

is the length of the data string.

RESPONSE

None

MODE

Any

BUS STATES

User-defined

SEE ALSO

SendCmd, SendData

EXAMPLES

char data[] = “W0X”;
errorcode = SendEoi(ieee, data, strlen (data));

The

SendEoi

command provides byte-by-byte control of data transfers and gives greater flexibility

than the other commands. This command can specify exactly which operations Driver488 executes.
Driver488 asserts

EOI

during the transfer of the final byte.

SPoll

SYNTAX

int pascal SPoll(DevHandleT devHandle);

devHandle

refers to either an interface or a specific external device.

RETURNS

-1 if error;

otherwise, 0 or 64 (hardware interface) in the range 0 to 255

(external device)

MODE

Any

BUS STATES

ATN

UNL, MLA, TAG, SPE, *ATN, ATNSPD, UNT

SEE ALSO

SPollList, PPoll

EXAMPLES

errorcode = SPoll(ieee);

Return the internal SRQ status

errorcode = SPoll(dmm);

Return the Serial Poll response of the

specified device

In Active Controller mode, the

SPoll

(Serial Poll) command performs a Serial Poll of the bus device

specified and responds with a number from

0

to

255

representing the decimal equivalent of the eight-

bit device response. If

rsv

(

DIO7

, decimal value

64

) is set, then that device is signaling that it requires

service. The meanings of the other bits are device-specific.

Serial Polls are normally performed in response to assertion of the Service Request (

SRQ

) bus signal by

some bus device. In Active Controller mode, with the interface device specified, the

SPoll

command

returns the internal

SRQ

status. If the internal

SRQ

status is set, it usually indicates that the

SRQ

line is

asserted. Driver488 then returns a

64

. If it is not set, indicating that

SRQ

is not asserted, then

Driver488 returns a

0

. With an external device specified,

SPoll

returns the Serial Poll status of the

specified external device.

In Peripheral mode, the

SPoll

command is issued only to the interface, and returns the Serial Poll

status. If

rsv

(

DIO7

, decimal value

64

) is set, then Driver488 has not been Serial Polled since the

issuing last

Request

command. The

rsv

is reset whenever Driver488 is Serial Polled by the

Controller.