Serial Polling The Status Register; Generating A Service Request Interrupt - JDS Uniphase TB9 Series User Manual

Optical grating filter
Table of Contents

Advertisement

OPEN "GPIB0" FOR INPUT AS #2
PRINT #1, "ABORT"
PRINT #1, "OUTPUT 05;WVL?"
PRINT #1, "ENTER 05"
INPUT #2, x
PRINT x
END

Serial Polling the Status Register

This sample changes the wavelength setting and reads the status register continuously until
the output has settled.
OPEN "GPIB0" FOR OUTPUT AS #1
OPEN "GPIB0" FOR INPUT AS #2
PRINT #1, "ABORT"
PRINT #1, "OUTPUT 05;csb"
bit
PRINT #1, "OUTPUT 05;WVL 1530e-9m"
sr = 0
WHILE (sr AND 4 )
PRINT #1, "SPOLL 05"
INPUT #2, sr
WEND
PRINT sr
END

Generating a Service Request Interrupt

This example tests the service request interrupt function. It unmasks the settling bit in the SRQ
mask register and sends a new wavelength setting. An interrupt is generated when the TB9
grating filter has completed changing the wavelength.
OPEN "GPIB0" FOR OUTPUT AS #1
OPEN "GPIB0" FOR INPUT AS #2
PRINT #1, "ABORT"
ON PEN GOSUB SPOLL
PEN ON
PRINT #1, "OUTPUT 05;CSB;SRE 4"
PRINT #1 "OUTPUT 05;WVL 1552.02nm" ' change wavelength setting
'
'
'
WHILE (INKEY$ = "")
WEND
PEN OFF
END
SPOLL:
PRINT #1, "SPOLL 05"
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
' clearing the status byte clears the settling
' change the wavelength to 1530 nm
' initialize sr variable to enter the while loop
' loop until settled bit is true
' serial poll the TB9 filter
' print final value of sr
' enable SRQ interrupt
' clear status register and unmask
' settled bit in SRQ mask register
' mode executed while wavelength set
' endless loop to simulate bigger program
' ends when any key is pressed
' serial poll the TB9 filter
Operating and Maintenance Instructions – 27

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tb9226Tb9166Tb9223Tb9126Tb9116Tb9106

Table of Contents