Linux-GPIB 4.3.7 Documentation
Prev |  | Next

# ibln

## Name

ibln -- check if listener is present (board or device)

## Synopsis

    #include <gpib/ib.h>

``int ibln`(int ud, int pad, int sad, short *found_listener);`

## Description

ibln() checks for the presence of a device, by attempting to address it as a listener. `ud` specifies the GPIB interface board which should check for listeners. If `ud` is a device descriptor, then the device's access board is used.

The GPIB address to check is specified by the `pad` and `sad` arguments. `pad` specifies the primary address, 0 through 30 are valid values. `sad` gives the secondary address, and may be a value from 0x60 through 0x7f (96 through 127), or one of the constants NO_SAD or ALL_SAD. NO_SAD indicates that no secondary addressing is to be used, and ALL_SAD indicates that all secondary addresses should be checked.

If the board finds a listener at the specified GPIB address(es), then the variable specified by the pointer `found_listener` is set to a nonzero value. If no listener is found, the variable is set to zero.

The board must be controller-in-charge to perform this function. Also, it must have the capability to monitor the NDAC bus line (see iblines()).

This function has the additional effect of addressing the board as talker for the duration of the Find Listeners protocol, which is beyond what IEEE 488.2 specifies. This is done because some boards cannot reliably read the state of the NDAC bus line unless they are the talker. Being the talker causes the board's gpib transceiver to configure NDAC as an input, so its state can be reliably read from the bus through the transceiver.

## Return value

The value of ibsta is returned.

Prev | Home | Next
iblines | Up | ibloc