GPIB programming in VB.NET? How set up device to communicate with?

Discussion in 'Programmer's Corner' started by EEDude, Nov 20, 2009.

  1. EEDude

    Thread Starter Active Member

    Nov 18, 2008
    Hi, I am trying to communictate through GPIB to control a source meter. The .NET examples that come with the NI488.2 driver are not very good at all. Mainly I am having trouble bringing the device online to be able to comunicate with. This example would only sends the IDN command to the meter and tries to read back the results to a message box, but I am not setting up the meter properly. Anyone have an example of how they set up there device?? When using VB6 I had this figured out in 30 mins. I have been going around in circles trying to figure this out using .NET. There is no good examples at all on the NI site I think because they want you to buy there add on software called Measurement Studio which is supposed to assist you in GPIB programming in .NET.

    Imports NationalInstruments.NI4882

    Public Class Form1
    Private GPIBDevice As Device

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    GPIBDevice = New Device(0, 26)
    End Sub
    End Class