Hi, I am getting this error - Unhandled exception. libplctag.LibPlcTagException: ErrorNotFound - i'm using Visual Studio 2022, i'm dummy here. Can someone help what may be wrong in my code?
using libplctag;
using libplctag.DataTypes;
using System;
using System.Net;
using System.Threading;
namespace CSharpDotNetCore
{
class SimpleExample
{
public static void Main(string[] args)
{
var myTag = new Tag<DintPlcMapper, int>()
{
Name = "PROGRAM:ROVITESTING.TEST_DINT",
//Name = "ROVITESTING",
Gateway = "192.168.1.110",
Path = "1,0",
PlcType = PlcType.ControlLogix,
Protocol = Protocol.ab_eip,
Timeout = TimeSpan.FromSeconds(10)
};
//Initialize the tag to set up structures and prepare for read/write
//This is optional as an optimization before using the tag
//If omitted, the tag will initialize on the first Read() or Write()
myTag.InitializeAsync();
//The value is held locally and only synchronized on Read() or Write()
//myTag.Value = 3737;
//Transfer Value to PLC
//myTag.Write();
//Transfer from PLC to Value
myTag.Read();
//Write to console
int myDint = myTag.Value;
Console.WriteLine(myDint);
Console.ReadKey();
}
}
}