Findlisteners, Finish – Measurement Computing Personal488 rev.3.0 For DOS & Windows 3.Xi User Manual
Page 341

15B. Driver488/SUB, W31, W95, & WNT
III. COMMAND REFERENCES - 15. Command References
III-326
Personal488 User’s Manual, Rev. 3.0
SEE ALSO
OnEvent, GetError, GetErrorList, Status
EXAMPLE
errorcode = Error(ieee, OFF);
The
Error
command enables or disables automatic on-screen display of Driver488 error messages.
Specifying
ON
enables the error message display, while specifying
OFF
disables the error message
display.
Error
ON
is the default condition.
FindListeners
SYNTAX
int pascal FindListeners(DevHandleT devHandle, char primary,
unsigned short *listener, short limit);
devHandle
refers to either an IEEE 488 interface or an external device. If
devHandle
refers to an external device, then the
FindListeners
command
acts on the hardware interface to which the external device is attached.
primary
is the primary IEEE 488 bus address to check.
listener
is a pointer to a list that contains all Listeners found on the specified
interface board. The user must allocate enough memory to accommodate all
of the possible Listeners up to the limit that he specified.
limit
is the maximum number of Listeners to be entered into the Listener list.
RETURNS
-1 if error
MODE
Any
BUS STATES
ATN
•MTA, UNL, LAG
SEE ALSO
CheckListener, BusAddress, Status
EXAMPLE
DevHandleT listeners[5];
errorcode = FindListeners(ieee,10,listeners,5)
The
FindListeners
command finds all of the devices configured to Listen at the specified primary
address on the IEEE 488 bus. The command first identifies the primary address to check and returns
the number of Listeners found and their addresses. Then, it fills the user supplied array with the
addresses of the Listeners found. The number of Listeners found is the value returned by the function.
The returned values include the secondary address in the upper byte, and the primary address in the
lower byte. If there is no secondary address, then the upper byte is set to
255
; hence, a device with
only a primary address of
16
and no secondary address, is represented as
0xFF10
, or
-240
decimal.
Finish
SYNTAX
int pascal Finish(DevHandleT devHandle);
devHandle
refers to either an IEEE 488 interface or an external device. If
devHandle
refers to an external device, the
Finish
command acts on the
hardware interface to which the external device is attached.
RETURNS
-1 if error
MODE
CA
BUS STATES
ATN
SEE ALSO
Resume, PassControl
EXAMPLE
errorcode = Finish(ieee);
The
Finish
command asserts Attention (
ATN
) and releases any pending holdoffs after a
Resume
function is called with the monitor flag set.