beautypg.com

Outputx – Measurement Computing Personal488 rev.3.0 User Manual

Page 106

background image

Personal488 for Windows 95/98/Me/NT/2000

04-10-01

API Reference 6-38

OutputX

Syntax

LONG WINAPI OutputX(DevHandleT devHandle, LPBYTE data, DWORD

count, BOOL last, BOOL forceAddr, TermT *term,
BOOL reserved, LPDWORD compStat);

devHandle

refers to either an interface or an external device. If

devHandle

refers to an

external device, the

OutputX

command acts on the hardware interface to which the

external device is attached.

data

is a string of bytes to send.

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

OutputX

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.

reserved

- this value is ignored.

compStat

is a pointer to an integer containing completion status information.

Returns

-1

if error

otherwise, the number of characters transferred

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

Example

term.EOI = TRUE;
term.nChar = 1;
term.EightBits = TRUE;
term.termChar[0] = ‘\r’;
data = “U0X”;
count = strlen(data);
bytecnt=Output(timer,data,count,1,0,&term,0,&stat);

See Also

EnterX, Term, TimeOut, Buffered

The

OutputX

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

OutputX

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

OutputX

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,

OutputX

acts as if the

forceAddr

flag were

TRUE

and sends the addressing information.

term

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 a terminator
structure requesting no terminators.

The

compStat

is a pointer to an integer containing completion status information. A null pointer indicates

that completion status is not requested.

This manual is related to the following products: