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

    EEDude Thread Starter Active Member

    Joined:
    Nov 18, 2008
    Messages:
    40
    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)
    GPIBDevice.Write("*IDN?")
    MsgBox(GPIBDevice.ReadString(200))
    End Sub
    End Class
Similar Threads
Forum Title Date
Programmer's Corner GPIB Help Oct 20, 2010
Programmer's Corner CAN YOU SOLVE THIS PROGRAMMING DILEMNA ? (a puzzle) Sep 30, 2014
Programmer's Corner Programming an RF solutions Zulu Module Sep 1, 2014
Programmer's Corner Ai-programming Jul 18, 2014
Programmer's Corner large c programming project code examples for microcontrollers needed Jun 23, 2014

Related Site Pages

Section Title
Worksheet Microcontroller principles

Share This Page