beautypg.com

Enteri (controller mode) – Measurement Computing Personal488 rev.3.0 For DOS & Windows 3.Xi User Manual

Page 338

background image

III. COMMAND REFERENCES - 15. Command References

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

Personal488 User’s Manual, Rev. 3.0

III-323

always refer to an I/O adapter, and the

forceAddr

flag is ignored. Thus,

EnterMore

is equivalent to

Enter

, and

EnterNMore

is equivalent to

EnterN

.

EnterI (Controller Mode)

Driver488/W31 (Visual Basic only)

EnterXI

SYNTAX

EnterXI (ByVal devHandle% ,data%, ByVal count&, ByVal

forceAddr%, Term As terms, ByVal async%, compStat%)As Long

devHandle%

refers to either an IEEE 488 interface or an external device.

data%

is the first element in an integer array into which the data is read.

count&

is the number of characters to read.

forceAddr%

is used to specify whether the addressing control bytes are to be

issued for each

EnterXI

command.

term

is a pointer to a terminator structure that is used to set up the input

terminators. If

term

is set to

0

, the default terminator is used.

async%

is a flag that allows asynchronous data transfer.

compStat%

is a pointer to an integer containing completion status information.

RETURNS

-1 if error,

otherwise the number of bytes transferred. The memory buffer

pointed to by the data parameter is filled in with the
information read from the device.

MODE

CA

BUS STATES

ATN

UNL, MLA, TAG, *ATN, data (With external device handle)

*ATN, data (With interface handle)

SEE ALSO

Output, Term, Buffered, EOL (Sub-Chapter 15A)

EXAMPLE

term.EOI = TRUE
term.nChar = 1
term.EightBits = TRUE
term.term1 = &HA
bytecount=EnterXI(timer,data%(0),1024,0,term,1,stat)

These

EnterI

commands for Visual Basic are identical to the standard

Enter

commands with the

exception of the return values being placed in integer variables rather than string variables.

The

EnterXI

command reads data from the I/O adapter. If an external device is specified, then

Driver488 is addressed to Listen, and that device is addressed to Talk. If an interface is specified, then
Driver488 must already be configured to receive data and the external device must be configured to
Talk, either as a result of an immediately preceding

EnterXI

command or as a result of one of the

Send

commands.

EnterXI

terminates reception on either the specified count of bytes transferred, or

the specified or default terminator being detected. Terminator characters, if any, are stripped from the
received data before the

EnterXI

command returns to the calling application.

The

forceAddr%

flag is used to specify whether the addressing control bytes are to be issued for each

EnterXI

command. If the device handle refers to an I/O adapter, then

forceAddr%

has no effect and

command bytes are not sent. For an external device, if

forceAddr%

is

TRUE

then Driver488 always

sends the

UNL

,

MLA

, and

TAG

command bytes. If

forceAddr%

is

FALSE

, then Driver488 compares the

current device with the previous device that used that interface adapter board for an

EnterXI

command. If they are the same, then no command bytes are sent. If they are different, then

EnterXI

acts as if the

forceAddr%

flag were

TRUE

and sends the command bytes. The

forceAddr%

flag is

usually set

TRUE

for the first transfer of data from a device, and then set

FALSE

for additional transfers

from the same block of data from that device.

Additional EnterI Functions