Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling Device using NationalInstrument.Visa.dll C#

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

0 Kudos
Message 1 of 2
(3,448 Views)

Hi,

 

Below is a page which give the location of C++ examples for NI drivers.

 

http://digital.ni.com/public.nsf/allkb/E0D14AB889CBF8E5862572B8006B22D3

 

Thanks,

 

Jack

0 Kudos
Message 2 of 2
(3,414 Views)