All About Circuits Forum

All About Circuits Forum (http://forum.allaboutcircuits.com/index.php)
-   Programmer's Corner (http://forum.allaboutcircuits.com/forumdisplay.php?f=12)
-   -   GPIB programming in VB.NET? How set up device to communicate with? (http://forum.allaboutcircuits.com/showthread.php?t=30464)

EEDude 11-21-2009 12:18 AM

GPIB programming in VB.NET? How set up device to communicate with?
 
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


All times are GMT. The time now is 01:46 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Copyright 2003-2011, All About Circuits. All Rights Reserved.