User`s manual
’ Call sub to check for AFG errors
Call CheckError("GenSeg (OutCommands)")
End Sub
Sub Main ()
’ Main sub
Dim Actual As Long
’ Set error routine
On Error GoTo AfgErr
ChkName = "Main"
’ Open communication path
Addr = iopen(ShowAddr)
’ Set timeout for 10 Sec
Call itimeout(Addr, 10000)
’Reset and clear the module
Action.Text = "Resetting the AFG; please wait"
ChkName = "RstClr"
Call RstClr
’ Generate segment list and output sequence
Action.Text = "Generate Segments"
ChkName = "GenSeg"
Call GenSeg
’ Query segment and segment/sequence memory
Action.Text = "Getting Memory Data"
ChkName = "RunQuery"
Call RunQuery
Action.Text = "DONE!"
’ Close communication with instrument
Call iclose(Addr)
’ Clean up sicl
Call siclcleanup
Exit Sub
’ In case of timeout
AfgErr:
Continued on Next Page
Chapter 1 Getting Started 37