beautypg.com

Busaddress, Checklistener – Measurement Computing Personal488 rev.3.0 For DOS & Windows 3.Xi User Manual

Page 331

background image

15B. Driver488/SUB, W31, W95, & WNT

III. COMMAND REFERENCES - 15. Command References

III-316

Personal488 User’s Manual, Rev. 3.0

BusAddress

SYNTAX

int pascal BusAddress (DevHandleT devHandle, char primary,

char secondary);

devHandle

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

primary

is the IEEE 488 bus primary address of the specified device.

secondary

is the IEEE 488 bus secondary address of the specified device. If the

specified device is an IEEE 488 hardware interface, this value must be

-1

since there are no secondary addresses for the IEEE 488 hardware interface.
For no secondary address, a

-1

must be specified.

RETURNS

-1 if error

MODE

Any

BUS STATES

None

SEE ALSO

MakeDevice

EXAMPLE

errorcode = BusAddress(dmm,14,0);

The

BusAddress

command sets the IEEE 488 bus address of the IEEE 488 hardware interface or an

external device. Every IEEE 488 bus device has an address that must be unique within any single
IEEE 488 bus system. The default IEEE 488 bus address for Driver488 is

21

, but this may be changed

if it conflicts with some other device.

CheckListener

SYNTAX

int pascal CheckListener(DevHandleT devHandle, char primary,

char 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 and a 0 if a listener was not found at
the specified address.

MODE

CA

BUS STATES

ATN

MTA, UNL, LAG, (check for NDAC asserted)

SEE ALSO

FindListener, BusAddress

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”);
}

The

CheckListener

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

specified address.