EasyManua.ls Logo

Agilent Technologies 75000 Series B - Program Example

Agilent Technologies 75000 Series B
78 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...
Program Example
The following program example sends a SCPI command and returns the data into a string variable.
Sub Main ()
Dim Addr As Integer
Dim Cmd As String
Dim RdMsg As String * 256
Dim Length As Integer
Dim Actual As Long
SCPI command
Cmd = “SYSTem:ERRor?” + Chr$(10)
Open communication path using GPIB address
Addr = iopen("hpib7,9,0")
Send SCPI command
Call iwrite(Addr, ByVal Cmd, Len(Cmd), 1, Actual)
Set space for returned data
Length = 256
Get readings
Call iread(Addr, ByVal RdMsg, Length, 0, Actual)
Show readings
MsgBox RdMsg, 0
Close communication with instrument
Call iclose(Addr)
Clean up sicl (for Windows only)
Call siclcleanup
End
End Sub
2-4 Sending SCPI Commands

Table of Contents