EasyManua.ls Logo

Agilent Technologies N8700 - Page 89

Agilent Technologies N8700
145 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
Loading...
Programming Examples 6
Series N8700 User’s Guide 89
' Set the voltage
.WriteString "VOLT" & Str$(VoltSetting)
' Set the current level
.WriteString "CURR " & Str$(CurrSetting)
' Set the triggered voltage and current levels
.WriteString "VOLT:TRIG " & Str$(trigVoltSetting)
.WriteString "CURR:TRIG " & Str$(trigCurrSetting)
' Turn the output on
.WriteString "OUTP ON"
' Make sure that the output is on
.WriteString "*OPC?"
.ReadString
' Measure the voltage before triggering the change
.WriteString "MEAS:VOLT?"
MeasureVolt = .ReadNumber
' Save the value for later display
msg1$ = "Voltage before trigger = " & Str$(MeasureVolt)
' Initiate the trigger system
.WriteString "INIT"
' Make sure that the trigger system is initiated
Do
.WriteString "STAT:OPER:COND?"
stat = .ReadNumber
Loop Until ((stat And WTG) = WTG)
' Trigger the unit
.WriteString "*TRG"
'Make sure that the trigger is done
.WriteString "*OPC?"
.ReadString
' Measure the voltage after triggering the change
.WriteString "MEAS:VOLT?"
MeasureVolt = .ReadNumber
' Display the measured values
MsgBox msg1$ + Chr$(13) + "Voltage after trigger = " & Str$(MeasureVolt)
' Check instrument for any errors
.WriteString "Syst:err?"
ErrString = .ReadString
' Give message if there is an error
If Val(ErrString) Then
MsgBox "Error in instrument!" & vbCrLf & ErrString
End If
End With
End Sub

Table of Contents

Related product manuals