beautypg.com

Checklistener – Measurement Computing Personal488 rev.3.0 User Manual

Page 73

background image

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

04-10-01

API Reference 6-5

CheckListener

Syntax

INT WINAPI CheckListener(DevHandleT devHandle, BYTE primary,

BYTE secondary);

devHandle

refers to either an IEEE 488 hardware interface or an external device. If

devHandle

refers to an external device, the

CheckListener

command acts on the

hardware interface to which the external device is attached.

primary

is the primary bus address to check for a Listener (

00

to

30

)

secondary

is the secondary bus address to check for a Listener (

00

to

31

). For no

secondary address, a

-1

must be specified

Returns

-1

if error

otherwise it returns a

1

if a listener was found at the specified address, or a

0

if a listener

was not found at the specified address.

Bus States

ATN

UNL, LAG,

(check for

NDAC

asserted)

Example

result = CheckListener(ieee,15,4);
if (result == 1)
{
printf(“Device found at specified address.\n”);
}
if (result == 0)
{
printf(“Device not found at specified address.\n”);
}

See Also

FindListener, BusAddress

The

CheckListener

command checks for the existence of a device on the IEEE 488 bus at the specified

address.

This manual is related to the following products: