Enteri (peripheral mode), Error – Measurement Computing Personal488 rev.3.0 For DOS & Windows 3.Xi User Manual
Page 340

III. COMMAND REFERENCES - 15. Command References
15B. Driver488/SUB, W31, W95, & WNT
Personal488 User’s Manual, Rev. 3.0
III-325
EnterI (Peripheral 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 ignored.
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 terminators are 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
Determined by the Controller
SEE ALSO
OutputX, 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 are placed in integer variables rather than string variables.
In Peripheral mode, the
EnterXI
command receives data from the I/O adapter under control of the
Active Controller. The Active Controller must put Driver488 into the Listen state and configure some
bus device to provide Driver488 with data. The Listen state can be checked with the
Status
command, or can cause an interrupt with the
Arm
command. A time-out error occurs (if enabled) if
Driver488 does not receive a data byte within the time out period after issuing the
EnterXI
command.
Additional EnterI Functions
Driver488 provides additional
EnterI
routines that are short form versions of the
EnterXI
function.
The additional
EnterI
functions are:
EnterI
and
EnterNI
. In Peripheral mode, the device handle
must always refer to an I/O adapter, and the
forceAddr%
flag is ignored. Thus,
EnterMoreI
is
equivalent to
EnterI
, and
EnterNMoreI
is equivalent to
EnterNI
.
Error
SYNTAX
int pascal Error(DevHandleT devHandle, bool display);
devHandle
refers to either an IEEE 488 interface or an external device.
display
indicates whether the error message display should be
ON
or
OFF
.
RETURNS
-1 if error
MODE
Any
BUS STATES
None