Download 6200 rev.D
Transcript
6200 rev.D 2/10/00 1:55 PM Page 32 Example 3 This program sets up and executes a wavelength scan using GPIB. Be sure to look at Example 1 before reading this program. '$INCLUDE: 'qbdecl.bas' CLS buff$ = SPACE$(32) 'Find the laser controller at GPIB address #1 CALL IBDEV(0, 1, 0, T10s, 1, 0, nflaser%) CALL IBCLR(nflaser%) 'Set up start and stop wavelengths INPUT "What start wavelength would you like [nm] ? ", wavelength! CALL IBWRT(nflaser%, ":WAVELENGTH:START " + STR$(wavelength!)) INPUT "What stop wavelength would you like [nm] ? ", wavelength! CALL IBWRT(nflaser%, ":WAVELENGTH:STOP " + STR$(wavelength!)) 'Set forward and return scan speeds to their maximum values CALL IBWRT(nflaser%, ":WAVELENGTH:SLEW:FORW 100") CALL IBWRT(nflaser%, ":WAVELENGTH:SLEW:RET 100") 'Get ready to scan CALL IBWRT(nflaser%, "OUTPUT:SCAN:RESET") PRINT "Tuning to the start wavelength...." 'Wait until laser gets to start wavelength. Here we use the '*OPC? (operation complete ?) query to see if :OUTPUT:SCAN:RESET 'has finished ready% = 0 WHILE ready% = 0 32