Agilent Technologies 86082A User Manual page 218

Wavelength domain component analyzer
Table of Contents

Advertisement

Status = viVPrintf(DevSessionNum, "TRAC:FEED:CONT " & cmbTrace.Text & ",ALW" & Chr$(10), 0)
If Status <> 0 Then GoTo ErrorHandler
'-- Make trace visible on the display
Status = viVPrintf(DevSessionNum, "DISP:WIND:TRAC:STAT " & cmbTrace.Text & ",1" & Chr$(10), 0)
If Status <> 0 Then GoTo ErrorHandler
'-- Start normalization for the appropriate channel
Status = viVPrintf(DevSessionNum, "INIT:NORM " & cmbInput.Text & ";*OPC" & Chr$(10), 0)
If Status <> 0 Then GoTo ErrorHandler
'-- Wait for completion
TimeStart = Now * 86400
Do
'-- If a minute goes by, throw a timeout
If (Now * 86400) - TimeStart > OPC_TMO Then GoTo OPCTimeOut
'-- Check bit 5 of the status byte register to see if the operation is complete
Status = viReadSTB(DevSessionNum, STB)
If Status <> 0 Then GoTo ErrorHandler
Call Sleep(10) 'Delay so the instrument isn't tied up with responding to STB
DoEvents
Loop While (STB And 32) <> 32
'-- Clear status information
Status = viVPrintf(DevSessionNum, "*CLS" & Chr$(10), 0)
If Status <> 0 Then GoTo ErrorHandler
'-- Enable normalization for the selected input
Status = viVPrintf(DevSessionNum, "SENS:NORM:ENABLE " & cmbInput.Text & ",ON" & Chr$(10), 0)
If Status <> 0 Then GoTo ErrorHandler
'-- Take a sweep and send OPC
Status = viVPrintf(DevSessionNum, "INIT:IMM;*OPC" & Chr$(10), 0)
If Status <> 0 Then GoTo ErrorHandler
'-- Wait for completion
TimeStart = Now * 86400
Do
Call Sleep(5) 'Delay so the instrument isn't tied up with responding to STB
DoEvents
'-- Check bit 5 of the status byte register to see if the operation is complete
Status = viReadSTB(DevSessionNum, STB)
If Status <> 0 Then GoTo ErrorHandler
'-- Check bit 7 to see if a lambda zero is taking place
If (STB And 128) = 128 Then
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
'Used to track elapsed time
'Used to track elapsed time
Remote Operation
Example Programs
5-43

Advertisement

Table of Contents
loading

Table of Contents