Hello guys! I am trying to write a C# program to communicate with my Yokogawa multimeter,
I have NI Visa (version 2022 Q3) and Ni488.2 (version 21.5.0) installed
My Visa resource name for this device is : GPIB0::1::INSTR
here is my C# code,
using System;
using System.Threading;
using System.Windows;
using NationalInstruments.Visa;
namespace GPIB_DMM_voltage
{
class program {
static void Main(string[] args)
{
try
{
var session = (Ivi.Visa.IMessageBasedSession)Ivi.Visa.GlobalResourceManager.Open("GPIB0::01::INSTR");
session.FormattedIO.WriteLine("*IDN?");
string idName = session.FormattedIO.ReadLine();
Console.WriteLine($"*IDN?) = {idName}");
session.Dispose();
session = null;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
Console.WriteLine("press entrer key to end");
Console.ReadLine();
}
}
}
But when I ran it, it is giving me this error.
Anyone know why? please help! and thank you guys!!