Term – Measurement Computing Personal488 rev.3.0 User Manual
Page 124

Personal488 for Windows 95/98/Me/NT/2000
04-10-01
API Reference 6-56
Term
Syntax
INT WINAPI Term(DevHandleT devHandle, TermT *term,
DWORD termFlag);
devHandle
refers to either an interface or an external device.
term
is a pointer to the terminator structure.
termFlag
can be either
TERMIN
,
TERMOUT
, or
TERMIN+TERMOUT
, specifying whether
input, output, or both are being set.
Returns
-1
if error
Bus States
None
Example
term.EOI = TRUE;
term.nChar = 1;
term.EightBits = TRUE;
term.termChar[0] = 13;
errorcode = Term(ieee,&term,TERMIN);
See Also
TermQuery, EnterX, OutputX, Status
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.