JDS Uniphase HA9 Series User Manual page 48

Extended range programmable optical attenuator
Table of Contents

Advertisement

PRINT #1, "RESET"
PRINT #1, "GPIBEOS IN LF"
PRINT #1, "GPIBEOS OUT LF"
DIM ATTEN AS SINGLE
DIM WAV AS INTEGER
PRINT #1, "OUTPUT 05;:INP:OFFS 10"
ATTEN = 30.0
WAV = 1550
PRINT #1, "OUTPUT 05;:INP:ATT";STR$(ATTEN);";WAV";STR$(WAV);"NM"
END
Querying Status
This example queries and displays the current 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"
PRINT #1, "OUTPUT 05;ATT?"
PRINT #1, "ENTER 05"
INPUT #2, A
PRINT A
END
Serial Polling the Status Register
This example changes the attenuation 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, "GPIBEOS IN CR LF"
PRINT#1, "GPIBEOS OUT CR LF"
PRINT #1, "OUTPUT 05;CSB"
PRINT #1, "OUTPUT 05;ATT 0.3456e2"
sr = 0
DO
PRINT #1, "SPOLL 05"
INPUT #2, sr
LOOP UNTIL (SR AND 4 = 4)
PRINT sr
END
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
' setting terminating characters to LF
' clearing the status byte clears the settling bit
' change the attenuation to 34.56 dB
' initialize sr variable to enter the while loop
' loop until settled bit is true
' serial poll the attenuator
' print final value of sr
Programming Guide – 42

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents