beautypg.com

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

Page 365

background image

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

III. COMMAND REFERENCES - 15. Command References

III-350

Personal488 User’s Manual, Rev. 3.0

RETURNS

-1 if error

MODE

CA

BUS STATES

ATN, TAG

SEE ALSO

Listen, SendCmd

EXAMPLES

errorcode = Talk (ieee, 12, -1);

The

Talk

command addresses an external device to Talk.

Term

SYNTAX

int pascal Term(DevHandleT devHandle, TermT *terminator, int

TermType);

devHandle

refers to either an interface or an external device.

terminator

is a pointer to the terminator structure.

TermType

can be either

IN

,

OUT

, or

IN+OUT

, specifying whether input, output, or

both are being set.

RETURNS

-1 if error

MODE

Any

BUS STATES

None

SEE ALSO

Enter, Output, Status, EOL (Sub-Chapter 15A)

EXAMPLE

term.EOI = TRUE;
term.nChar = 1;
term.EightBits = TRUE;
term.termChar[0] = 13;
errorcode = Term(ieee,&term,IN);

The

Term

command sets the end-of-line (

EOL

) terminators for input from, and output to, I/O adapter

devices. These terminators are sent at the end of output data and expected at the end of input data, in
the manner of

CR LF

as used with printer data.

During output,

Term

appends the bus output terminator to the data before sending it to the I/O adapter

device. Conversely, when Driver488 receives the bus input terminator, it recognizes the end of a
transfer and returns the data to the calling application. The terminators never appear in the data
transferred to or from the calling application. The default terminators for both input and output are set
by the startup configuration and are normally

CR LF EOI

, which is appropriate for most bus devices.

End-Or-Identify (

EOI

) has a different meaning when it is specified for input than when it is specified

for output. During input,

EOI

specifies that input is terminated on detection of the

EOI

bus signal,

regardless of which characters have been received. During output,

EOI

specifies that the

EOI

bus

signal is to be asserted during the last byte transferred.

TermQuery

Driver488/W95 only

SYNTAX

INT TermQuery(DevHandleT devHandle, TermT *terminator, INT

TermType);

devHandle

refers to either an interface or an external device.

terminator

is a pointer to the terminator structure.

TermType

can be either

IN

,

OUT

, or

IN+OUT

, specifying whether input, output, or

both are being set.

RETURNS

-1 if error

MODE

Any

BUS STATES

None

SEE ALSO

Term, Enter, Output, Status, EOL (Sub-Chapter 15A)

EXAMPLE

None provided.