Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5565

USB Control 34411A

$
0
0

Hi All

I want to control a DMM 34411A with Visual Basic 2008, but the program does not connect to the device for usb.

Installed: NI-VISA 15.5, ICP15, Keysight io libraries, System Windows XP. In NI-VISA Interactive Control the device is determined.

In Visual Basic Add VisaCom 5.5 and Ivi.Visa.Interop .

 

Option Explicit On
Imports System
Imports System.ComponentModel
Imports System.Threading
Imports System.IO.Ports
Imports Ivi.Visa.Interop

Public Class Form1
Dim ioMgr As Ivi.Visa.Interop.ResourceManager
Dim myInstr As Ivi.Visa.Interop.FormattedIO488
Dim idn As String
Dim ResourseStr As String = "USB0::0x0957::0x0A07::MY53002107::0::INSTR"

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
ioMgr = New Ivi.Visa.Interop.ResourceManager
myInstr = New Ivi.Visa.Interop.FormattedIO488

Try
myInstr.IO = ioMgr.Open(ResourseStr)
Catch ex As Exception
MsgBox("Could not Connect!", vbOKOnly, "Error Opening Connect")
End Try

myInstr.IO.Timeout = 1000

myInstr.WriteString("*idn?")
idn = myInstr.ReadString()
RichTextBox2.Text &= idn

myInstr.IO.Clear()
myInstr.IO.Clear()
End Sub
End Class

 

 

Thank you in advance.


Viewing all articles
Browse latest Browse all 5565

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>