beautypg.com

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

Page 353

background image

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

III. COMMAND REFERENCES - 15. Command References

III-338

Personal488 User’s Manual, Rev. 3.0

must always refer to an I/O adapter, and the

forceAddr

flag is ignored. Thus,

OutputMore

is

equivalent to

Output

, and

OutputNMore

is equivalent to

OutputN

.

OutputI (Controller Mode)

Driver488/W31 (Visual Basic only)

OutputXI

SYNTAX

OutputXI (ByVal devHandle%, data%, ByVal count&, ByVal last%,

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

devHandle%

refers to either an interface or an external device. If

devHandle%

refers to an external device, the

OutputXI

command acts on the hardware

interface to which the external device is attached.

data%

is the first element in an integer array which holds the data being sent.

count&

is the number of bytes to send.

last%

is a flag that forces the device output terminator to be sent with the data.

forceAddr%

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

issued for each

OutputXI

command.

terms

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

terminators. If

terms

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 characters transferred

MODE

CA

BUS STATES

With interface handle: REN (if SC and AutoRemote), *ATN, ATN

With external device handle: REN (if SC and AutoRemote),

ATN

MTA, UNL, LAG, *ATN, ATN

SEE ALSO

EnterI, Term, TimeOut, Buffered, EOL (Sub-Chapter 15A)

EXAMPLES

term.EOI = TRUE
term.nChar = 1
term.EightBits = TRUE
term.term1 = &HA
data%(0) = 1
data%(1) = 2
data%(2) = 3
bytecount = OutputI(dev, data%(0), 3, 0, term, 1, stat)

The

OutputI

commands for Visual Basic are identical to the standard

Output

commands except for

the variable holding the data to be sent is an integer rather than a string type.

The

OutputXI

command sends data to an interface or external device. The Remote Enable (

REN

) line

is first asserted if Driver488 is the System Controller and

AutoRemote

is enabled. Then, if a device

address (with optional secondary address) is specified, Driver488 is addressed to Talk and the specified
device is addressed to Listen. If no address is specified, then Driver488 must already be configured to
send data, either as a result of a preceding

OutputXI

command, or as the result of a

Send

command.

Terminators are automatically appended to the output data as specified.

The

forceAddr%

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

OutputXI

command. If the device handle refers to an interface,

forceAddr%

has no effect and

command bytes are not sent. If the device handle refers to an external device and

forceAddr%

is

TRUE

, Driver488 addresses the interface to Talk and the external device to Listen. If

forceAddr%

is

FALSE

, Driver488 compares the current device with the most recently addressed device on that

interface. If the addressing information is the same, no command bytes are sent. If they are different,

OutputXI

acts as if the

forceAddr%

flag were

TRUE

and sends the addressing information.

The

terms

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

pointer may be a null pointer, requesting use of the default terminators for the device, or it may point to