AnsweredAssumed Answered

Trying to communicate with a 34972A via a USB port and Visual Basic 2010

Question asked by s.crider on Apr 5, 2013
Latest reply on Jun 12, 2013 by lhornburg
Hello all,

It has been a while since I programmed anything and I am having a little difficulty finding some good resources over the matter in the subject line.  
In short I need to write a program in Visual Basic 2010 Express.  I will be communicating with the device via a USB port and need to set up one 34901A to read analog voltage, another 34901A to read temperature, and one 34907A to trigger a digital out line.  Since I am using Visual Basic 2010, it looks like I need to use Ivi.Visa.Interop but I can't seem to find any resources on how to use it to communicate to the device via the USB.  It looks like there are several work arounds, like using something called Command Expert, but that is not an option I can use presently.  Here is what I got so far:

Imports Ivi.Visa.Interop

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim rsc As New ResourceManager
        Dim sesn As IVisaSession
        Dim lines As String()

        lines = rsc.FindRsrc("?*INSTR")
        sesn = rsc.Open(lines(0), AccessMode.NO_LOCK, 2000)

    End Sub

End Class

I think I am having a little trouble with the next step.  I am familiar with the old visa32.dll protocals but it looks like the Ivi.Visa.Interop is different.  Any help would be appreciated.