Just realized I should've posted in the .NET forum, I will repost there.
I am using a GPIB interface. The code I am trying to execute is incredibly simple, as I am just learning how to use measurement studio and how to interface with these type of devices.
I wanted to write a simple program to allow a user to type in a text command and write it to the connected device and then read the buffer back as a string. I was not too concerned with error checking and robustness considering this is my first measurement studio project.
Here is literally my entire program:
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
#End Region
Private m_Multimeter As Device
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
m_Multimeter = New Device(0, 22, 0, TimeoutValue.T10s) ' have also used the 2 argument version with (0, 22)
End Sub
Private Sub WriteButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WriteButton.Click
m_Multimeter.Write(CommandBox.Text)
End Sub
Private Sub ReadButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ReadButton.Click
OutputBox.Text = m_Multimeter.ReadString()
End Sub
End Class
The command box is for the user to type in the text command to the device. This code worked fine for me two nights ago but when I opened the project the next day I started to get the conflicting error codes which I do not understand. I have tried rebooting the multimeter, rebooting the PC, and disconnecting the device from the PC, just to make sure it wasn't a fluke.
CLA, CCVID, Certified Instructor