beautypg.com

Findlisteners, Findlisteners findlstn, Syntax – Measurement Computing GPIB-488.2 User Manual

Page 30

background image

3-12

IOtech to Associated MCC APIs

986992

GPIB 488.2 Porting Guide

IOtech GPIB Command

Associated MCC GPIB 488.2 Command(s)

FindListeners FindLstn

Syntax

FindListeners INT WINAPI FindListeners(DevHandleT devHandle, BYTE

primary, LPWORD listener, DWORD limit);

FindListn

FindLstn(int board, short addresslist[],

short resultlist[], int limit)

Usage Notes

FindListeners, no longer to be used, located all of the devices that were configured to Listen at
the specified primary address. The command first identified the primary address to check; and
then returned the number of Listeners found and their addresses. Then, it filled the user-
supplied array with the addresses of the Listeners found.

FindListn

finds all listeners on the GPIB. The addresses specified by addresslist are

tested to see if a listening device is present. If a listener is found at a primary address, its
address is placed in resultlist. If no listeners are detected at a primary address, then all
secondary addresses associated with that primary address are tested. If any listeners are
detected, their addresses are placed in resultlist. You can use this routine to determine
how many devices on the network are capable of listening. Once these devices are detected,
they can be identified by their response to identification request messages.
The following would be used to check for listening devices present at GPIB primary addresses
6 and 7, on Board 0.
Example:

short addresslist[3] = {6,7,NOADDR};

short resultlist[4];

FindLstn(0, addresslist, resultlist, 4);

Also see IOtech’s:

CheckListener