Step 2 - Initialization; Step 3 - Find All Listeners - National Instruments GPIB-PCII Getting Started

Hide thumbs Also See for GPIB-PCII:
Table of Contents

Advertisement

Chapter 3
Writing an Advanced Program Using NI-488.2 Routines
Step 2 – Initialization
Initialize the IEEE-488 bus and the GPIB-PCII/IIA Controller circuitry so that
the IEEE-488 interface for each device is quiescent, and so that the GPIB-
PCII/IIA is Controller-In-Charge and is in the Active Controller State (CACS).
This is accomplished with the SendIFC procedure. The first and only
argument of SendIFC is the GPIB-PCII/IIA interface board number.
CALL SendIFC(0)
IF IBSTA% < 0 THEN
CALL gpiberr("SendIFC(0) error")
CALL IBONL (0,0)
STOP
END IF
Step 3 – Find All Listeners
Find all of the instruments attached to the IEEE-488 bus. Create an array that
contains all of the IEEE-488 primary addresses that could possibly be connected
to the IEEE-488 bus. Assume that you are only attaching devices with primary
addresses (0 to 30) to the bus. The end of the list of addresses must be marked
with the NOADDR constant, which is defined in the QBDECL.BAS file that was
included at the beginning of this program.
FOR K% = 0 to 30
instruments%(K%) = K%
NEXT K%
instruments%(31) = NOADDR
Next find out which, if any, device or devices are connected. This is easily
accomplished by using the FindLstn procedure. The first argument is the
GPIB-PCII/IIA board number, the second argument is the list of instruments that
was created above, the third argument is a list of instrument addresses that the
procedure actually found, and the last argument is the maximum number of
devices that the procedure may find (that is, it must stop if it reaches the limit).
© National Instruments Corp.
3-3
PCII/IIA and NI-488.2 MS-DOS

Advertisement

Table of Contents
loading

This manual is also suitable for:

Gpib-pciia181065-01181065-02

Table of Contents