Quantcast
Channel: Measurement Studio for .NET Languages topics
Viewing all articles
Browse latest Browse all 1999

Controlling Device using NationalInstrument.Visa.dll C#

$
0
0

Hi,

I am writing  an app in C#.net to control a device using the NationalInstrument.Visa.dlll and Ivi.VIsa.Interop

Is there any document guide of how to use basic functions such as: find(), open()??? or maybe an example in C#?

I found the following example for  VB but I can not find the right way for C#:

Public Class Osciloscope

    Public rs As ResourceManager = New ResourceManager()

    Public visaSession As MessageBasedSession

 

    Public Function ListDevices() As String()

        Dim a As String() = rs.Find("(ASRL|GPIB|TCPIP|USB)?*")

        Return a

    End Function

 

    Public Function Connect(ByVal DeviceIDString As String)

        Try

            visaSession = rs.Open(DeviceIDString)

        Catch ex As Exception

            MsgBox(ex.Message, MsgBoxStyle.Critical)

        End Try

    End Function

 

Maybe an example with the general functions??

 

thanks


Viewing all articles
Browse latest Browse all 1999

Trending Articles



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