User`s manual
Call TimeOut
End Sub
Sub RstClr ()
Dim RdMsg As String * 10
Dim Actual As Long
Dim Length As Integer
Length = 10
’ Executes the commands that resets the module and clears its error register
Call iwrite(Addr, ByVal "*RST;*OPC?" + Chr$(10), 11, 1, Actual)
Call iread(Addr, ByVal RdMsg, Length, 0, Actual)
Length = 10
Call iwrite(Addr, ByVal "*CLS;*OPC?" + Chr$(10), 11, 1, Actual)
Call iread(Addr, ByVal RdMsg, Length, 0, Actual)
End Sub
Sub RunQuery ()
Dim GetMem As String
Dim RdMsg As String * 100
Dim Actual As Long
ShowQuery.Visible = True
ShowQuery.Enabled = True
’ Query segment memory
GetMem = "SOUR:LIST1:SEGM:FREE?"
Call iwrite(Addr, ByVal GetMem + Chr$(10), Len(GetMem) + 1, 1, Actual)
Call iread(Addr, ByVal RdMsg, 100, 0, Actual)
ShowQuery.AddItem "Segment Memory Available/Used: " + Mid$(RdMsg, 1, Actual - 1)
’ Query sequence memory
GetMem = "SOUR:LIST1:SSEQ:FREE?"
Call iwrite(Addr, ByVal GetMem + Chr$(10), Len(GetMem) + 1, 1, Actual)
Call iread(Addr, ByVal RdMsg, 100, 0, Actual)
ShowQuery.AddItem "Sequence Memory Available/Used: " + Mid$(RdMsg, 1, Actual - 1)
End Sub
Sub TimeOut ()
’ Shows timeout message and exits program
Continued on Next Page
38 Getting Started Chapter 1