Rs232 Interface Programming Example - JDS Uniphase TB9 Series User Manual

Optical grating filter
Table of Contents

Advertisement

INPUT #2, sr
PRINT sr
PRINT #1, "SPOLL 05"
INPUT #2, sr
PRINT sr
RETURN

RS232 Interface Programming Example

This section provides a programming example for controlling the TB9 grating filter over the
RS232 interface. The sample was written in MS-DOS Qbasic and run on a personal computer,
equipped with a serial port. The COM 2 port of the computer must be designated as the serial
port and must be connected to the TB9 grating filter.
The RS232 command that appears in this section does not show the terminating character
<CR>; however, it is implied.
The RS232C interface cannot receive an SRQ interrupt.
OPEN "com2:1200,n,8,1" FOR RANDOM AS #1
CLS
' clear unit
PRINT #1, "clr"
' identify unit
PRINT #1, "idn?"
INPUT #1
PRINT a$
' set unit to 1550 nm
PRINT #1, "wvl 1550 nm"
' fetch status
PRINT #1, "wvl?"
INPUT #1, wvl
PRINT #1, "xdr?"
INPUT #1, xdr
PRINT #1, "stb?"
INPUT #1, stb
PRINT #1, "sre?"
INPUT #1, sre
PRINT #1, "err?"
INPUT #1, err
PRINT #1, "lerr?"
INPUT #1, lerr
' print status
PRINT wvl,xdr,stb,sre,err,lerr
CLOSE
END
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
' read status register
' verify SRQ bit is set
' serial poll again to verify SRQ bit is cleared
' read status register
Operating and Maintenance Instructions – 28

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tb9226Tb9166Tb9223Tb9126Tb9116Tb9106

Table of Contents