Operating and Maintenance Instructions – 26
The SRQ mask register can unmask more than one event at a time. The first unmasked event
to change from 0 to 1 causes an interrupt. To acknowledge this interrupt, the GPIB interface
can be serial polled or the status register can be read with STB?. The first time the filter is
serial polled after an SRQ is generated, bit 6 is on. Subsequent serial polling returns a value
with bit 6 off. Similarly, STB? returns the status register with the SRQ set, but then the filter
logic automatically clears the register. As a result, subsequent STB? queries return 0.
The SRQ mask register is cleared by powering up the TB9 filter, by the clear device command
(CLR), or by the universal device clear command ( DC1).
GPIB Programming Examples
This section provides programming examples for controlling the TB9 filter over the GPIB
interface. The examples were written in MS-DOS Qbasic and run on a personal computer
equipped with a National Instruments
3
GPIB interface board with National Instruments
Universal Language Interface drivers loaded. The commands that control the GPIB are similar
to Hewlett Packard
4
HP Basic commands. Most other controller board manufacturers provide
basic output and input statements for communicating messages to a GPIB instrument.
The GPIB commands that appear in this section do not always show the terminating sequence
<CR> <LF>; however, it is implied.
Sending Commands
This example sets the wavelength to 1550 nm.
OPEN "GPIB0" FOR OUTPUT AS #1
OPEN "GPIB0" FOR INPUT AS #2
PRINT #1, "ABORT"
PRINT #1, "OUTPUT 05;wvl 1550e-9 m"
END
This example demonstrates the use of a variable in the statement that transmits the
wavelength command.
OPEN "GPIB0" FOR OUTPUT AS #1
OPEN "GPIB0" FOR INPUT AS #2
PRINT #1, "ABORT"
xwvl = 1550
PRINT #1, "OUTPUT 05;wvl";xwvl;"nm"
END
Querying Status
This sample queries and displays the current wavelength setting.
OPEN "GPIB0" FOR OUTPUT AS #1
3
National Instruments is a trademark of National Instruments.
4
Hewlett Packard is a registered trademark of Hewlett-Packard Co.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com