Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

IVI vb express GPIB control prog example

Hi Guys does anyone have a very simple program to gain control of
hardware via IVI drivers, I am trying the lecroy scope with no luck as
the examples online are all C based, is they start "using" i just get
errors in vb express edition

I have added the references so i must allmost be there!!

Thank you

Dan <- confused
0 Kudos
Message 1 of 3
(3,960 Views)

Hello Daniel,

       Here is a link that might help: Visual Basic 6.0 and .NET in Instrument Control.

 

Cheers,

 

NathanT

0 Kudos
Message 2 of 3
(3,944 Views)
Here you go if anyone wonders!
Ive solved it!

Private Sub btnInitIO_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnInitDSOIO.Click
' set the I/O address to the text box in case the user changed
it.
' bring up the input dialog and save any changes to the text
box
Dim mgr As Ivi.Visa.Interop.ResourceManager

Dim ioAddress As String
On Error GoTo ioError

ioAddress = ScopeBox.SelectedItem

'txtAddress.Text = ioAddress
mgr = New Ivi.Visa.Interop.ResourceManager
iodso = New Ivi.Visa.Interop.FormattedIO488
iodso.IO() = mgr.Open("GPIB0::6::INSTR") 'GPIB0::6::INSTR
ioaddress

'do an instrument id check
Dim result As String
On Error GoTo ioErroridn

'iodso.IO.Clear()
'result = ""
iodso.WriteString("*idn?")
result = iodso.ReadString

scopeidstring.Text = result

Exit Sub
ioErroridn:
MsgBox("GetID Error:" & vbCrLf & Err.Description)

Exit Sub
ioError:
MsgBox("InitIO Error:" & vbCrLf & Err.Description)
End Sub
0 Kudos
Message 3 of 3
(3,911 Views)