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!!
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