Agilent Technologies 33250A User Manual page 285

80 mhz function / arbitrary waveform generator
Hide thumbs Also See for 33250A:
Table of Contents

Advertisement

'
'
Using the Status Registers
'
Arb.Output "apply:sin 10e3,1,0"
Arb.Output "trig:sour bus"
Arb.Output "burst:ncycles 50000"
Arb.Output "burst:stat on"
Arb.Output "*ese 1"
Arb.Output "*sre 32"
Check_Errors
Arb.Output "*trg;*opc"
Dim Stats As Integer
Dim Done As Boolean
Done = False
While Not Done
Arb.Output "*stb?"
Arb.Enter Stats
If Stats And 64 Then
Done = True
End If
Wend
MsgBox "Done", vbOKOnly, "33250A "
cmdStart.Enabled = True
End Sub
Private Sub Form_Load()
Dim IdStr As String
m_Count = 1
Arb.Output "*IDN?"
Arb.Enter IdStr
Caption = IdStr
End Sub
Sub Check_Errors()
Dim ErrVal(0 To 1)
With Arb
.Output "syst:err?"
.Enter ErrVal
While ErrVal(0) <> 0
lstErrors.AddItem ErrVal(0) & "," & ErrVal(1) ' Display errors
lstErrors.Refresh
.Output "SYST:ERR?"
.Enter ErrVal
Wend
End With
End Sub
Continued...
Chapter 6 Application Programs
Example: Microsoft Visual Basic for Windows
' 10kHz Sine wave; 1Vpp
' Bus Trigger in Burst
' 50000 cycles x 0.1ms = 5s
' Turn ON burst mode
' Operation complete enabled
' Operation complete sets SRQ
' Routine checks for errors
' Trigger burst
' *OPC signals end of *TRG
' Variable to store status
' Controls While loop
' Request status byte
' Read status byte
' Test Master Summary bit
' Query instrument information
' Read result into IdStr
' Make that data the message on box
' Query any errors data
' Read: Errnum,"Error String"
' End if find: 0,"No Error"
' Update the box
' Request error message
' Read error message
4
6
285

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents