EasyManuals Logo

JDS Uniphase HA9 Series User Manual

JDS Uniphase HA9 Series
88 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #49 background imageLoading...
Page #49 background image
Programming Guide 43
Generating a Service Request Interrupt
A service request interrupt is generated when the attenuator completes changing the
attenuation setting.This example tests the service request interrupt function. It unmasks the
settled bit in the SRQ mask register and sends a new attenuation setting.
OPEN "GPIB0" FOR OUTPUT AS #1
OPEN "GPIB0" FOR INPUT AS #2
PRINT #1, "ABORT"
PRINT#1, "GPIBEOS IN CR LF"
PRINT#1, "GPIBEOS OUT CR LF"
ON PEN GOSUB SPOLL 'enable SRQ interrupt
PEN ON
PRINT #1, "OUTPUT 05;CSB;SRE 4" ' clear status register and unmask
' settled bit in SRQ mask register
PRINT #1 "OUTPUT 05;ATT 45" ' change attenuation setting
' More code executed while attenuation set
'
'
WHILE (INKEY$ = "") ' endless loop to simulate bigger program
WEND ' ends when any key is pressed
PEN OFF
END
SPOLL:
PRINT #1, "SPOLL 05" ' serial poll the attenuator
INPUT #2, sr ' read status register
PRINT sr ' verify SRQ bit is set
PRINT #1, "SPOLL 05" ' serial poll again to verify SRQ bit is now cleared
INPUT #2, sr ' read status register
PRINT sr
RETURN
Learn Query (LRN?)
This example demonstrates the use of the Learn query:
OPEN "GPIB0" FOR OUTPUT AS #1
OPEN "GPIB0" FOR INPUT AS #2
PRINT #1, "ABORT"
PRINT#1, "GPIBEOS IN CR LF"
PRINT#1, "GPIBEOS OUT CR LF"
PRINT #1, "OUTPUT 05;LRN?" ' send the learn query command
PRINT #1, "ENTER 05"
INPUT #2, fiber, block, srq_mask, cal, atten, wave
' The above variables can be saved in a data file before quitting the program and
' then later read back and used to restore the attenuator to the same state in ATT mode
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the JDS Uniphase HA9 Series and is the answer not in the manual?

JDS Uniphase HA9 Series Specifications

General IconGeneral
BrandJDS Uniphase
ModelHA9 Series
CategoryControl Unit
LanguageEnglish

Related product manuals