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

VISA ResourceManager Find Method

$
0
0

Hello ,

In my C# application to control an oscilloscope I am trying to find the list of devices connected so after I can connect using ResourceManager.Open(strDevice)

I found a syntax error in the rm.find

I would appreciate if somebody can help me to get the right syntax to find the list of devices and connect

Follows my code:

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NationalInstruments.Visa;
using Ivi.Visa;

namespace Oscilloscope_Test
{
class DeviceTest
{
public ResourceManager rm = new ResourceManager();
public MessageBasedSession visaSession;


public string[] ListDevices()
  {
     string[] device = rm.Find("(ASRL|GPIB|TCPIP|USB)?*"); // Error here wrong sintaxis

     return device;
   }
}

 

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>