KIKUSUI Electronics Corp.
340
msg = rm.Open(
"USB0::0x0B3E::0x104E::00000001::INSTR"
,
AccessMode
.NO_LOCK, 0,
""
)
'Version using a VISA alias
'msg = rm.Open("MYDEV1", AccessMode.NO_LOCK, 0, "")
ʻ
Version using LAN (SCPI-RAW)
'msg = rm.Open("TCPIP::169.254.7.8::5025::SOCKET", AccessMode.NO_LOCK, 0, "")
'Version using GPIB
'msg = rm.Open("GPIB0::1::INSTR", AccessMode.NO_LOCK, 0, "")
msg.TerminationCharacterEnabled =
True
End Sub
ʻ
Query the ID
Private Sub
Button1_Click(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System
.
EventArgs
)
Handles
Button1.Click
msg.WriteString(
"SYST:COMM:RLST REM"
& vbLf)
msg.WriteString(
"*IDN?"
& vbLf)
TextBox1.Text = msg.ReadString(256)
End Sub
ʻ
Set the voltage, frequency, and output.
Private Sub
Button2_Click(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System
.
EventArgs
)
Handles
Button2.Click
msg.WriteString(
"OUTP 0"
& vbLf)
msg.WriteString(
"VOLT 110"
& vbLf)
msg.WriteString(
"FREQ 60"
& vbLf)
msg.WriteString(
"OUTP 1"
& vbLf)
End Sub
'Queries the measured voltage
Private Sub
Button3_Click(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System
.
EventArgs
)
Handles
Button3.Click
msg.WriteString(
"MEAS:VOLT:AC?"
& vbLf)
TextBox1.Text = msg.ReadString(256)
End Sub
Private Sub
Form1_Disposed(
ByVal
sender
As Object
,
ByVal
e
As
System
.
EventArgs
)
Handles
Me.Disposed
msg.Close()
End Sub